26 Commits

Author SHA1 Message Date
Giancarlo Rottoli 5b1a6235a7 Ingressi Caber - Check non modificato csv 2024-09-23 08:41:46 +02:00
Samuele Locatelli 71557f9336 Merge tag 'FixIn2Ev03' into develop
Fix algoritmo sostituzione: riportato indietro
2024-09-20 15:01:06 +02:00
Samuele Locatelli 0015d54f60 Merge branch 'release/FixIn2Ev03' 2024-09-20 15:00:50 +02:00
Samuele Locatelli 01926cca84 Riporto indietro algoritmo sostituzione tags 2024-09-20 15:00:33 +02:00
Samuele Locatelli 08893d7954 Merge tag 'FixIn2Ev02' into develop
Fix gestione sostituzione eventi: considerando spazio pre/post
2024-09-20 10:08:28 +02:00
Samuele Locatelli 77a8602d40 Merge branch 'release/FixIn2Ev02' 2024-09-20 10:08:15 +02:00
Samuele Locatelli 31ecb827f2 Update algoritmo sostituzione eventi con spazio pre/post x evitare duplicati mal interpretati 2024-09-20 10:07:51 +02:00
Samuele Locatelli 6fedee77b2 Merge tag 'FixIn2Ev01' into develop
Fix gestione ingressi/eventi
- fix pagine pre-processing file rul
- fix pagina generazione ingressi 2 eventi
2024-09-18 07:40:33 +02:00
Samuele Locatelli 14f48e4d5c Merge branch 'release/FixIn2Ev01' 2024-09-18 07:40:03 +02:00
Samuele Locatelli 42fa3db8be Refresh pubblicazione 2024-09-18 07:39:37 +02:00
Samuele Locatelli 93eb3977a0 Trovato fix x ingressi 2 eventi, da verificare sia ok x stati poi... 2024-09-17 19:25:23 +02:00
Samuele Locatelli f53fc4c53f Fix gestione bonifica file *.rul
- non modifica micro stati x mappe ingressi
- fix grafici vari (minori)
2024-09-17 17:56:44 +02:00
Samuele Locatelli 0327246395 Merge tag 'AddForceResetPage02' into develop
Correzione gestione base url + fix vers numb
2024-08-19 18:32:57 +02:00
Samuele Locatelli 762b4f70ed Merge branch 'release/AddForceResetPage02' 2024-08-19 18:32:47 +02:00
Samuele Locatelli 55f40679b5 - Fix gestione calc olo versione
- Fix reload con baseUrl
2024-08-19 18:32:16 +02:00
Samuele Locatelli 3b55637cd7 Merge tag 'AddForceResetPage01' into develop
Aggiunta pagina ForceReset
2024-08-19 18:23:13 +02:00
Samuele Locatelli 6b4ca6bd6c Merge branch 'release/AddForceResetPage01' 2024-08-19 18:23:05 +02:00
Samuele Locatelli 1620ba43d5 Aggiunta pagina ForceReset 2024-08-19 18:20:50 +02:00
Giancarlo Rottoli 5fed4d1ef2 Aggiornamento x LVF 2024-07-22 17:09:07 +02:00
Samuele Locatelli f7cff6e969 Merge tag 'AddUpdater_2.5' into develop
Aggiunta gestione email anche al resp (se diverso da notifica
principale)
2024-06-14 18:47:23 +02:00
Samuele Locatelli e124ebfd97 Merge branch 'release/AddUpdater_2.5' 2024-06-14 18:47:08 +02:00
Samuele Locatelli e94c621b96 Fix messaggi sendReboot 2024-06-13 10:04:16 +02:00
Samuele Locatelli 872f66eee4 Fix num versione in log + fix script udpate 2.5.2 2024-06-13 09:39:56 +02:00
Samuele Locatelli 1924809d0f Update script IOB-PI a 8/12 IN 2024-06-12 17:55:41 +02:00
Samuele Locatelli deca006214 Merge tag 'AddIobPiZip_02' into develop
Update conf x install IOB-PI
2024-06-11 10:33:47 +02:00
Samuele Locatelli 9eb16e3e65 Merge branch 'release/AddIobPiZip_02' 2024-06-11 10:31:00 +02:00
42 changed files with 5195 additions and 693 deletions
+796
View File
@@ -0,0 +1,796 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# readParallela v. 2.5.2 12 Ingressi
# - single instance timer
# - invio multiplo x send eventi accodati
# - gestione segnali BLINKING
# - gestione INVERSIONE segnali cv 10-VII-2018
# - gestione FILTRAGGIO segnali brevi cv 23-VII-2018
# - (2.3) gestione 12 bit cv 14-I-2020
# - (2.4) fix ingressi e conf apertura parallela + gestione vari bit filtraggio x nuovi ingressi + update conf con 12 parametri bit SEL 15-I-2020
# - (2.4.8) versione adatta a raspberry PI vecchia generazione (GPIO corto, 8bit)
# - (2.5) Fix (hope) ciclo "wait send to complete", gestione timeout (rety infinito se IO riparte in modo anomalo)
# - (2.5.1) Fix numero versione 18.05.2023
# - (2.5.2) Fix gestione eccezioni con report dettagliato
#---------------------------------------------------------------
# levare locking
# timer semplificata
# GPIO global
import time
import sys
from datetime import datetime
import urllib
import ConfigParser
import os, sys
import logging
import logging.handlers
import threading
import Queue
from array import *
#--------------------------------------------------------------
# COSTANTI
MSGLEN = 9
TIMEOUTSERIALE = 10
MAXRETRY = 10
# numero campioni filtraggio segnale ballerino
MAX_COUNTER_BLINK = 10
PROGRAM_NAME ="ReadPar IOB-pi v.2.5.2"
# DA FILE CONF
idxMacchina = "1001"
SAMPLETIME = 0.1
TIMEOUTSHORT = (SAMPLETIME*20)
TIMEOUTLONG = (SAMPLETIME*600)
SENDURLTIME = 0.08
NMAXSEND = 5 # numero massimo di invii per singolo ciclo di svuotamento
# VAR
to_enable = False
to_short = TIMEOUTSHORT
to_long = TIMEOUTLONG
to_serial = TIMEOUTSERIALE
to_retry = MAXRETRY
errormsglen = 0
# VAR
out_0 = 24
out_1 = 26
in_0 = 11
in_1 = 12
in_2 = 13
in_3 = 15
in_4 = 16
in_5 = 18
in_6 = 22
in_7 = 7
in_8 = 29
in_9 = 31
in_10 = 32
in_11 = 36
# contatore: serve x match tra accoda ed invia x possibile controllo a posteriori... ogni volta che accodo incremento di 1, va da 0 a 9999
cont = '0'
# variabile stato online/offline della macchina
onLine = '1'
# variabile stato seinding/waiting x la parte invio URL
sending = '0'
# variabile stato timer thread busy
timer_busy = False
#
# array per ingressi filtrati
i_counters = array ( 'i',[0,0,0,0,0,0,0,0,0,0,0,0])
B_blinking = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
B_previous = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
B_input = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
B_output = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
B_inverting = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
B_filter = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
B_filter_prev = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
B_temp = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0])
i_filter_counters = array ( 'i',[0,0,0,0,0,0,0,0,0,0,0,0])
#--------------------------------------------------------------
# Gestione coda (condivisa) x registrazione eventi ed invio URL
#print "Creazione coda illimitata"
Coda = Queue.Queue(0)
#queueLock = threading.Lock()
#---------------------------------------------------------------
# lettura parallela
# ritorna il byte letto pulito ( due char hex )
def readParallelaFiltrata():
global in_0
global in_1
global in_2
global in_3
global in_4
global in_5
global in_6
global in_7
global in_8
global in_9
global in_10
global in_11
global GPIO
current = ''
try:
if GPIO.input(in_0):
B_input[0] = 0
else:
B_input[0] = 1
if GPIO.input(in_1):
B_input[1] = 0
else:
B_input[1] = 1
if GPIO.input(in_2):
B_input[2] = 0
else:
B_input[2] = 1
if GPIO.input(in_3):
B_input[3] = 0
else:
B_input[3] = 1
if GPIO.input(in_4):
B_input[4] = 0
else:
B_input[4] = 1
if GPIO.input(in_5):
B_input[5] = 0
else:
B_input[5] = 1
if GPIO.input(in_6):
B_input[6] = 0
else:
B_input[6] = 1
if GPIO.input(in_7):
B_input[7] = 0
else:
B_input[7] = 1
if GPIO.input(in_8):
B_input[8] = 0
else:
B_input[8] = 1
if GPIO.input(in_9):
B_input[9] = 0
else:
B_input[9] = 1
if GPIO.input(in_10):
B_input[10] = 0
else:
B_input[10] = 1
if GPIO.input(in_11):
B_input[11] = 0
else:
B_input[11] = 1
#ciclo per ogni segnale
for i in xrange(12) :
#print (i)
# v2.1 gestione inversione bit ingresso
if ( B_inverting[i] == 1 ) :
if ( B_input[i] == 0 ) :
B_input[i] = 1
else :
B_input[i] = 0
# v2.2 gestione filtro segnali brevi
if ( B_filter[i] == 1 ) :
# fronte 0 -> 1
if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 0 ) :
if ( i_filter_counters[i] == 0 ) :
# vero fronte 0 -> 1
i_filter_counters[i] = MAX_COUNTER_FILTER
B_temp[i] = 0 # tengo l' ingresso a 0
#logPro.info("START spike 0->1 on bit " + `i` )
else :
# fine disturbo breve di uno stato 1
i_filter_counters[i] = 0
B_temp[i] = 1 # tengo l' ingresso a 1
logPro.info("END spike 0->1 on bit " + `i` )
# stabile 1 -> 1
if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 1 ) :
if ( i_filter_counters[i] == 0 ) :
# segnale stabile a 1
B_temp[i] = 1 # tengo l' ingresso a 1
else :
# poco dopo il fronte
i_filter_counters[i] = i_filter_counters[i] - 1
B_temp[i] = 0 # tengo l' ingresso a 0
# fronte 1 -> 0
if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 1 ) :
if ( i_filter_counters[i] == 0 ) :
# vero fronte 1 -> 0
i_filter_counters[i] = MAX_COUNTER_FILTER
B_temp[i] = 1 # tengo l' ingresso a 1
#logPro.info("START spike 1->0 on bit " + `i` )
else :
# fine disturbo breve di uno stato 0
i_filter_counters[i] = 0
B_temp[i] = 0 # tengo l' ingresso a 0
logPro.info("END spike 1->0 on bit " + `i` )
# stabile 0 -> 0
if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 0 ) :
if ( i_filter_counters[i] == 0 ) :
# segnale stabile a 0
B_temp[i] = 0 # tengo l' ingresso a 0
else :
# poco dopo il fronte
i_filter_counters[i] = i_filter_counters[i] - 1
B_temp[i] = 1 # tengo l' ingresso a 1
B_filter_prev [i] = B_input[i]
B_input[i] = B_temp[i]
# fine gestione filtro segnali brevi
# se non blinking, copia ingresso
if ( B_blinking[i] == 0 ) :
B_output[i] = B_input[i]
else:
# gestione segnale blinking
# se fronte del segnale
if ( B_previous[i] != B_input[i] ) :
B_previous[i] = B_input[i]
# se fronte di salita
if ( B_input[i] == 1 ) :
# subito uscita = 1
B_output[i] = 1
i_counters[i] = MAX_COUNTER_BLINK
#else :
# # loggo che ho rilevato un blink...
# logPro.info("Blink down on bit " + `i`)
else:
# no , segnale eguale a prima
# se input a 0
if ( B_input[i] == 0 ) :
# E CONTEGGIO IN CORSO
if ( i_counters[i] > 0 ) :
i_counters[i] = i_counters[i] -1
if ( i_counters[i] == 0 ) :
B_output[i] = 0
logPro.info("END Blink on bit " + `i` )
#Rimettiamo insieme i bit
new_value = 0
if ( B_output[0] == 1 ) :
new_value = new_value + 1
if ( B_output[1] == 1 ) :
new_value = new_value + 2
if ( B_output[2] == 1 ) :
new_value = new_value + 4
if ( B_output[3] == 1 ) :
new_value = new_value + 8
if ( B_output[4] == 1 ) :
new_value = new_value + 16
if ( B_output[5] == 1 ) :
new_value = new_value + 32
if ( B_output[6] == 1 ) :
new_value = new_value + 64
if ( B_output[7] == 1 ) :
new_value = new_value + 128
if ( B_output[8] == 1 ) :
new_value = new_value + 256
if ( B_output[9] == 1 ) :
new_value = new_value + 512
if ( B_output[10] == 1 ) :
new_value = new_value + 1024
if ( B_output[11] == 1 ) :
new_value = new_value + 2048
current = hex( new_value ).replace ( "0x" , "" ).upper()
except Exception as e:
print "Errore in readParallelaFiltrata \n\n"
print str(e)
pass
return current
#---------------------------------------------------------------
#Funzione di scrittura su coda con try-except
def accoda():
try:
dtEve = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3]
Coda.put(dtEve + '#' + value + '#' + cont)
except Queue.Full:
logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` )
except Exception as e:
logPro.error( "NETWORK:Errore http-no com rete-timeout" + url )
logPro.error(str(e))
#--------------------------------------------------------------
# svuotaCoda x invio dati al server
def svuota_coda():
global onLine
global sending
global timer_busy
global NMAXSEND
#print "start timer "
if ( timer_busy == False ):
timer_busy = True
#print "start timer ok "
try:
if not Coda.empty():
#print "coda da svuotare!"
response = urllib.urlopen(URLALIVE)
answ = response.read()
if answ == 'OK':
#print "OK alive"
response2 = urllib.urlopen(URLENABLED + idxMacchina)
answ2 = response2.read()
if answ2 == 'OK':
# aggiorno stato ad online
if onLine == '0':
logPro.info("IOB ONLINE!")
#print("IOB ONLINE")
onLine = '1' # imposto comunque online
else:
if onLine == '1':
logPro.error("IOB offline")
#print("IOB offline")
onLine = '0'
else:
if onLine == '1':
logPro.error("Server offline")
#print("Server offline")
onLine = '0'
# ora verifico SE si possa inviare (ovvero sia online server e NON ci siano altri send attivi...)
if onLine == '1':
if sending == '0':
#segnalo che sono in sending!
sending = '1'
# SAM 2016.12.23: modifica x invio FINO A nMaxSend ELEMENTI ad ogni ciclo di svuotamento
i = NMAXSEND
while i >= 0:
if not Coda.empty():
# formatto dataOra corrente
dtCurr = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3]
#prendo primo elemento dalla coda
resp = Coda.get()
# recupero valori da elemento coda!
dtEve = resp.split("#")[0]
value = resp.split("#")[1]
cnt = resp.split("#")[2]
url = URLBASE + idxMacchina + URLADV1 + value
url = url + '&dtCurr=' + dtCurr + '&dtEve=' + dtEve + '&cnt=' + cnt
# CHIAMO URL
response3 = urllib.urlopen ( url )
answ3 = response3.read()
#print(url)
# log valore inviato!
logSnd.info( value + ' ['+ cnt +']' + ' R:' + answ3 )
#print "Valore smaltito dalla coda"
# tolgo 1 al contatore
i -= 1
# completato invio, riporto sending a zero!
sending = '0'
else:
if to_retry > 0:
to_retry -= 1
logPro.info("WAIT active send to complete")
else:
sending = '0'
to_retry = MAXRETRY
logPro.info("END WAIT, reset to_retry var")
else:
pass
else:
pass
except Exception as e:
if onLine == '1':
logPro.error("Server Non raggiungibile")
logPro.error(str(e))
#print "Non raggiungibile"
onLine = '0'
# in ogni caso
timer_busy = False
#print "end timer ok"
#print "end timer "
#---------------------------------------------------------------
# funzione timer thread
#---------------------------------------------------------------
def do_every (interval, worker_func, iterations = 0):
if iterations != 1:
threading.Timer (
interval,
do_every, [interval, worker_func, 0 if iterations == 0 else iterations-1]
).start ();
worker_func ();
#---------------------------------------------------------------
# gestione contatore
#---------------------------------------------------------------
def contatore():
try:
global cont
ctr = int(cont)
ctr +=1
ctr = ctr % 10000 # round robin 10000 eventi x track
cont = str(ctr)
except Exception as e:
print("errore incremento contatore \n\n")
print(str(e))
#---------------------------------------------------------------
# avvia porta parallela
#---------------------------------------------------------------
def avviaParallela():
global in_0
global in_1
global in_2
global in_3
global in_4
global in_5
global in_6
global in_7
global in_8
global in_9
global in_10
global in_11
global GPIO
try:
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
#GPIO.setup(out_0, GPIO.OUT) # output 0
#GPIO.setup(out_1, GPIO.OUT) # output 1
GPIO.setup(in_0, GPIO.IN) # input 0
GPIO.setup(in_1, GPIO.IN) # input 1
GPIO.setup(in_2, GPIO.IN) # input 2
GPIO.setup(in_3, GPIO.IN) # input 3
GPIO.setup(in_4, GPIO.IN) # input 4
GPIO.setup(in_5, GPIO.IN) # input 5
GPIO.setup(in_6, GPIO.IN) # input 6
GPIO.setup(in_7, GPIO.IN) # input 7
GPIO.setup(in_8, GPIO.IN) # input 8
GPIO.setup(in_9, GPIO.IN) # input 9
GPIO.setup(in_10, GPIO.IN) # input 10
GPIO.setup(in_11, GPIO.IN) # input 11
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n")
print str(e)
sys.exit(1)
print( "\n\n" + PROGRAM_NAME + " - init ok \n\n")
#---------------------------------------------------------------
#---------------------------------------------------------------
# MAIN
try:
config = ConfigParser.RawConfigParser()
config.read ( 'IOB.cfg' )
SAMPLETIME = config.getfloat ( 'time' , 'SAMPLETIME' )
TIMEOUTSHORT = config.getfloat ( 'time' , 'TIMEOUTSHORT' )
TIMEOUTLONG = config.getfloat ( 'time' , 'TIMEOUTLONG' )
SENDURLTIME = config.getfloat ( 'time' , 'SENDURLTIME' )
NMAXSEND = config.getint ( 'time' , 'NMAXSEND' )
idxMacchina = config.get ( 'id' , 'idxMacchina' )
URLBASE = config.get ( 'web' , 'URLBASE' )
URLENABLED = config.get('web' , 'URLENABLED')
URLALIVE = config.get ('web' , 'URLALIVE')
URLADV1 = config.get ( 'web' , 'URLADV1' )
LOGFILE = config.get ( 'log' , 'LOGFILE' )
LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' )
B_blinking[0] = config.getint ( 'blink' , 'bit0' )
B_blinking[1] = config.getint ( 'blink' , 'bit1' )
B_blinking[2] = config.getint ( 'blink' , 'bit2' )
B_blinking[3] = config.getint ( 'blink' , 'bit3' )
B_blinking[4] = config.getint ( 'blink' , 'bit4' )
B_blinking[5] = config.getint ( 'blink' , 'bit5' )
B_blinking[6] = config.getint ( 'blink' , 'bit6' )
B_blinking[7] = config.getint ( 'blink' , 'bit7' )
B_blinking[8] = config.getint ( 'blink' , 'bit8' )
B_blinking[9] = config.getint ( 'blink' , 'bit9' )
B_blinking[10] = config.getint ( 'blink' , 'bit10' )
B_blinking[11] = config.getint ( 'blink' , 'bit11' )
MAX_COUNTER_BLINK = config.getint ( 'blink' , 'MAX_COUNTER_BLINK' )
# cv 2.1 se bit = 1 allora inverto segnale in ingresso...
B_inverting[0] = config.getint ( 'invert' , 'bit0' )
B_inverting[1] = config.getint ( 'invert' , 'bit1' )
B_inverting[2] = config.getint ( 'invert' , 'bit2' )
B_inverting[3] = config.getint ( 'invert' , 'bit3' )
B_inverting[4] = config.getint ( 'invert' , 'bit4' )
B_inverting[5] = config.getint ( 'invert' , 'bit5' )
B_inverting[6] = config.getint ( 'invert' , 'bit6' )
B_inverting[7] = config.getint ( 'invert' , 'bit7' )
B_inverting[8] = config.getint ( 'invert' , 'bit8' )
B_inverting[9] = config.getint ( 'invert' , 'bit9' )
B_inverting[10] = config.getint ( 'invert' , 'bit10' )
B_inverting[11] = config.getint ( 'invert' , 'bit11' )
# cv 2.2 se bit = 1 allora filtro segnali brevi ...
B_filter[0] = config.getint ( 'filter' , 'bit0' )
B_filter[1] = config.getint ( 'filter' , 'bit1' )
B_filter[2] = config.getint ( 'filter' , 'bit2' )
B_filter[3] = config.getint ( 'filter' , 'bit3' )
B_filter[4] = config.getint ( 'filter' , 'bit4' )
B_filter[5] = config.getint ( 'filter' , 'bit5' )
B_filter[6] = config.getint ( 'filter' , 'bit6' )
B_filter[7] = config.getint ( 'filter' , 'bit7' )
B_filter[8] = config.getint ( 'filter' , 'bit8' )
B_filter[9] = config.getint ( 'filter' , 'bit9' )
B_filter[10] = config.getint ( 'filter' , 'bit10' )
B_filter[11] = config.getint ( 'filter' , 'bit11' )
MAX_COUNTER_FILTER = config.getint ( 'filter' , 'MAX_COUNTER_FILTER' )
except Exception as e:
print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg'
print str(e)
sys.exit(1)
#--------------------------------------------
# oggetto Logger
#--------------------------------------------
try:
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename=LOGFILE,
filemode='a'
)
# aggiungo 2 logger specifici x queue e send...
logQue = logging.getLogger('queue')
logSnd = logging.getLogger('sendUrl')
logPro = logging.getLogger('program')
except Exception as e:
# manda mail o simili - FARE!!!
print "LOG: Impossibile creare file log con nome"
print (LOGFILE)
print "\n\n"
print str(e)
#--------------------------------------------
print "\n\n" + PROGRAM_NAME + "\n\n"
global startstatus
startstatus = 1
if startstatus == 1:
logPro.info("Avvio Programma" + PROGRAM_NAME)
## Verifica l'OS e di conseguenza carica il file relativo con metodo di lockfile appropriato + check singola istanza
if os.name == 'posix':
import unix
else:
import win
logPro.info( "Start " + PROGRAM_NAME )
# lettura file configurazione
# [id]
# idxMacchina = 2001
# [time]
# SAMPLETIME = 0.1
# TIMEOUTSHORT = 200
# TIMEOUTLONG = 6000
print ( ' idxMacchina = %s' % ( idxMacchina ) )
print ( ' SAMPLETIME = %4.2f' % ( SAMPLETIME ) )
print ( ' TIMEOUTSHORT = %4.2f' % ( TIMEOUTSHORT ) )
print ( ' TIMEOUTLONG = %4.2f' % ( TIMEOUTLONG ) )
print ( ' SENDURLTIME = %4.2f' % ( SENDURLTIME ) )
print ( ' URLBASE = %s' % ( URLBASE ) )
print ( ' URLADV1 = %s' % ( URLADV1 ) )
print ( ' LOGFILE = %s' % ( LOGFILE ) )
print ( ' LOGLEVEL = %s' % ( LOGLEVEL ) )
# -sys.stdout.write ( 'idxMacchina ?' + idxMacchina + '\n')
to_short = TIMEOUTSHORT
to_long = TIMEOUTLONG
#--------------------------------------------------------------
# apertura parallela
try:
import RPi.GPIO as GPIO
except RuntimeError:
print( "\n\n" + PROGRAM_NAME + " - Error 1 - you need superuser privileges")
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 2 - you need superuser privileges. USE 'sudo' to run your script\n\n")
print str(e)
sys.exit(1)
avviaParallela()
#--------------------------------------------------------------
# MARCO: qui inserire avvio thread di "svuotaCoda"
# avviaSvuotaCoda
#print "Avvia svuota coda"
do_every ( SENDURLTIME , svuota_coda );
#---------------------------------------------------------------
# ciclo forever and ever
old = ''
#print "Avvio ciclo"
logPro.info("Avvio loop principale")
while 1:
try:
time.sleep (SAMPLETIME)
except Exception as e:
logPro.info("First_SLEEP: errore attesa sampletime")
logPro.error(str(e))
# lettura dati da IOB
value = readParallelaFiltrata()
if ( value != '' ) :
if value != old :
#loggo e invio dati
try:
logQue.info( value + ' ['+ cont +']')
errormsglen = 0
accoda()
contatore()
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda")
logPro.error(str(e))
pass
#enable e reset timer
to_enable = True
to_short = TIMEOUTSHORT
to_long = TIMEOUTLONG
old = value
# gestione timeout breve
if ( to_enable ) :
to_short = to_short - SAMPLETIME
if to_short <= 0:
#loggo e invio dati
try:
logQue.info( '>' + value + ' ['+ cont +']')
errormsglen = 0
accoda()
contatore()
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_short")
logPro.error(str(e))
pass
to_short = TIMEOUTSHORT
to_enable = False # dopo un colpo il timer breve viene disabilitato
to_long = TIMEOUTLONG
# gestione timeout lungo
to_long = to_long - SAMPLETIME
if to_long <= 0:
#loggo e invio dati
try:
logQue.info( '>>' + value + ' ['+ cont +']')
errormsglen = 0
accoda()
contatore()
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_long")
logPro.error(str(e))
pass
to_long = TIMEOUTLONG
+733
View File
@@ -0,0 +1,733 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# readParallela v. 2.5.2 8 Ingressi
# - single instance timer
# - invio multiplo x send eventi accodati
# - gestione segnali BLINKING
# - gestione INVERSIONE segnali cv 10-VII-2018
# - gestione FILTRAGGIO segnali brevi cv 23-VII-2018
# - (2.3) gestione 12 bit cv 14-I-2020
# - (2.4) fix ingressi e conf apertura parallela + gestione vari bit filtraggio x nuovi ingressi + update conf con 12 parametri bit SEL 15-I-2020
# - (2.4.8) versione adatta a raspberry PI vecchia generazione (GPIO corto, 8bit)
# - (2.5) Fix (hope) ciclo "wait send to complete", gestione timeout (rety infinito se IO riparte in modo anomalo)
# - (2.5.1) Fix numero versione 18.05.2023
# - (2.5.2) Fix gestione eccezioni con report dettagliato
#---------------------------------------------------------------
# levare locking
# timer semplificata
# GPIO global
import time
import sys
from datetime import datetime
import urllib
import ConfigParser
import os, sys
import logging
import logging.handlers
import threading
import Queue
from array import *
#--------------------------------------------------------------
# COSTANTI
MSGLEN = 9
TIMEOUTSERIALE = 10
MAXRETRY = 10
# numero campioni filtraggio segnale ballerino
MAX_COUNTER_BLINK = 10
PROGRAM_NAME ="ReadPar IOB-pi v.2.5.2"
# DA FILE CONF
idxMacchina = "1001"
SAMPLETIME = 0.1
TIMEOUTSHORT = (SAMPLETIME*20)
TIMEOUTLONG = (SAMPLETIME*600)
SENDURLTIME = 0.08
NMAXSEND = 5 # numero massimo di invii per singolo ciclo di svuotamento
# VAR
to_enable = False
to_short = TIMEOUTSHORT
to_long = TIMEOUTLONG
to_serial = TIMEOUTSERIALE
to_retry = MAXRETRY
errormsglen = 0
# VAR
out_0 = 24
out_1 = 26
in_0 = 11
in_1 = 12
in_2 = 13
in_3 = 15
in_4 = 16
in_5 = 18
in_6 = 22
in_7 = 7
# contatore: serve x match tra accoda ed invia x possibile controllo a posteriori... ogni volta che accodo incremento di 1, va da 0 a 9999
cont = '0'
# variabile stato online/offline della macchina
onLine = '1'
# variabile stato seinding/waiting x la parte invio URL
sending = '0'
# variabile stato timer thread busy
timer_busy = False
#
# array per ingressi filtrati
i_counters = array ( 'i',[0,0,0,0,0,0,0,0])
B_blinking = array ( 'B',[0,0,0,0,0,0,0,0])
B_previous = array ( 'B',[0,0,0,0,0,0,0,0])
B_input = array ( 'B',[0,0,0,0,0,0,0,0])
B_output = array ( 'B',[0,0,0,0,0,0,0,0])
B_inverting = array ( 'B',[0,0,0,0,0,0,0,0])
B_filter = array ( 'B',[0,0,0,0,0,0,0,0])
B_filter_prev = array ( 'B',[0,0,0,0,0,0,0,0])
B_temp = array ( 'B',[0,0,0,0,0,0,0,0])
i_filter_counters = array ( 'i',[0,0,0,0,0,0,0,0])
#--------------------------------------------------------------
# Gestione coda (condivisa) x registrazione eventi ed invio URL
#print "Creazione coda illimitata"
Coda = Queue.Queue(0)
#queueLock = threading.Lock()
#---------------------------------------------------------------
# lettura parallela
# ritorna il byte letto pulito ( due char hex )
def readParallelaFiltrata():
global in_0
global in_1
global in_2
global in_3
global in_4
global in_5
global in_6
global in_7
global GPIO
current = ''
try:
if GPIO.input(in_0):
B_input[0] = 0
else:
B_input[0] = 1
if GPIO.input(in_1):
B_input[1] = 0
else:
B_input[1] = 1
if GPIO.input(in_2):
B_input[2] = 0
else:
B_input[2] = 1
if GPIO.input(in_3):
B_input[3] = 0
else:
B_input[3] = 1
if GPIO.input(in_4):
B_input[4] = 0
else:
B_input[4] = 1
if GPIO.input(in_5):
B_input[5] = 0
else:
B_input[5] = 1
if GPIO.input(in_6):
B_input[6] = 0
else:
B_input[6] = 1
if GPIO.input(in_7):
B_input[7] = 0
else:
B_input[7] = 1
#ciclo per ogni segnale
for i in xrange(8) :
#print (i)
# v2.1 gestione inversione bit ingresso
if ( B_inverting[i] == 1 ) :
if ( B_input[i] == 0 ) :
B_input[i] = 1
else :
B_input[i] = 0
# v2.2 gestione filtro segnali brevi
if ( B_filter[i] == 1 ) :
# fronte 0 -> 1
if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 0 ) :
if ( i_filter_counters[i] == 0 ) :
# vero fronte 0 -> 1
i_filter_counters[i] = MAX_COUNTER_FILTER
B_temp[i] = 0 # tengo l' ingresso a 0
#logPro.info("START spike 0->1 on bit " + `i` )
else :
# fine disturbo breve di uno stato 1
i_filter_counters[i] = 0
B_temp[i] = 1 # tengo l' ingresso a 1
logPro.info("END spike 0->1 on bit " + `i` )
# stabile 1 -> 1
if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 1 ) :
if ( i_filter_counters[i] == 0 ) :
# segnale stabile a 1
B_temp[i] = 1 # tengo l' ingresso a 1
else :
# poco dopo il fronte
i_filter_counters[i] = i_filter_counters[i] - 1
B_temp[i] = 0 # tengo l' ingresso a 0
# fronte 1 -> 0
if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 1 ) :
if ( i_filter_counters[i] == 0 ) :
# vero fronte 1 -> 0
i_filter_counters[i] = MAX_COUNTER_FILTER
B_temp[i] = 1 # tengo l' ingresso a 1
#logPro.info("START spike 1->0 on bit " + `i` )
else :
# fine disturbo breve di uno stato 0
i_filter_counters[i] = 0
B_temp[i] = 0 # tengo l' ingresso a 0
logPro.info("END spike 1->0 on bit " + `i` )
# stabile 0 -> 0
if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 0 ) :
if ( i_filter_counters[i] == 0 ) :
# segnale stabile a 0
B_temp[i] = 0 # tengo l' ingresso a 0
else :
# poco dopo il fronte
i_filter_counters[i] = i_filter_counters[i] - 1
B_temp[i] = 1 # tengo l' ingresso a 1
B_filter_prev [i] = B_input[i]
B_input[i] = B_temp[i]
# fine gestione filtro segnali brevi
# se non blinking, copia ingresso
if ( B_blinking[i] == 0 ) :
B_output[i] = B_input[i]
else:
# gestione segnale blinking
# se fronte del segnale
if ( B_previous[i] != B_input[i] ) :
B_previous[i] = B_input[i]
# se fronte di salita
if ( B_input[i] == 1 ) :
# subito uscita = 1
B_output[i] = 1
i_counters[i] = MAX_COUNTER_BLINK
#else :
# # loggo che ho rilevato un blink...
# logPro.info("Blink down on bit " + `i`)
else:
# no , segnale eguale a prima
# se input a 0
if ( B_input[i] == 0 ) :
# E CONTEGGIO IN CORSO
if ( i_counters[i] > 0 ) :
i_counters[i] = i_counters[i] -1
if ( i_counters[i] == 0 ) :
B_output[i] = 0
logPro.info("END Blink on bit " + `i` )
#Rimettiamo insieme i bit
new_value = 0
if ( B_output[0] == 1 ) :
new_value = new_value + 1
if ( B_output[1] == 1 ) :
new_value = new_value + 2
if ( B_output[2] == 1 ) :
new_value = new_value + 4
if ( B_output[3] == 1 ) :
new_value = new_value + 8
if ( B_output[4] == 1 ) :
new_value = new_value + 16
if ( B_output[5] == 1 ) :
new_value = new_value + 32
if ( B_output[6] == 1 ) :
new_value = new_value + 64
if ( B_output[7] == 1 ) :
new_value = new_value + 128
current = hex( new_value ).replace ( "0x" , "" ).upper()
except Exception as e:
print "Errore in readParallelaFiltrata \n\n"
print str(e)
pass
return current
#---------------------------------------------------------------
#Funzione di scrittura su coda con try-except
def accoda():
try:
dtEve = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3]
Coda.put(dtEve + '#' + value + '#' + cont)
except Queue.Full:
logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` )
except Exception as e:
logPro.error( "NETWORK:Errore http-no com rete-timeout" + url )
logPro.error(str(e))
#--------------------------------------------------------------
# svuotaCoda x invio dati al server
def svuota_coda():
global onLine
global sending
global timer_busy
global NMAXSEND
#print "start timer "
if ( timer_busy == False ):
timer_busy = True
#print "start timer ok "
try:
if not Coda.empty():
#print "coda da svuotare!"
response = urllib.urlopen(URLALIVE)
answ = response.read()
if answ == 'OK':
#print "OK alive"
response2 = urllib.urlopen(URLENABLED + idxMacchina)
answ2 = response2.read()
if answ2 == 'OK':
# aggiorno stato ad online
if onLine == '0':
logPro.info("IOB ONLINE!")
#print("IOB ONLINE")
onLine = '1' # imposto comunque online
else:
if onLine == '1':
logPro.error("IOB offline")
#print("IOB offline")
onLine = '0'
else:
if onLine == '1':
logPro.error("Server offline")
#print("Server offline")
onLine = '0'
# ora verifico SE si possa inviare (ovvero sia online server e NON ci siano altri send attivi...)
if onLine == '1':
if sending == '0':
#segnalo che sono in sending!
sending = '1'
# SAM 2016.12.23: modifica x invio FINO A nMaxSend ELEMENTI ad ogni ciclo di svuotamento
i = NMAXSEND
while i >= 0:
if not Coda.empty():
# formatto dataOra corrente
dtCurr = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3]
#prendo primo elemento dalla coda
resp = Coda.get()
# recupero valori da elemento coda!
dtEve = resp.split("#")[0]
value = resp.split("#")[1]
cnt = resp.split("#")[2]
url = URLBASE + idxMacchina + URLADV1 + value
url = url + '&dtCurr=' + dtCurr + '&dtEve=' + dtEve + '&cnt=' + cnt
# CHIAMO URL
response3 = urllib.urlopen ( url )
answ3 = response3.read()
#print(url)
# log valore inviato!
logSnd.info( value + ' ['+ cnt +']' + ' R:' + answ3 )
#print "Valore smaltito dalla coda"
# tolgo 1 al contatore
i -= 1
# completato invio, riporto sending a zero!
sending = '0'
else:
if to_retry > 0:
to_retry -= 1
logPro.info("WAIT active send to complete")
else:
sending = '0'
to_retry = MAXRETRY
logPro.info("END WAIT, reset to_retry var")
else:
pass
else:
pass
except Exception as e:
if onLine == '1':
logPro.error("Server Non raggiungibile")
logPro.error(str(e))
#print "Non raggiungibile"
onLine = '0'
# in ogni caso
timer_busy = False
#print "end timer ok"
#print "end timer "
#---------------------------------------------------------------
# funzione timer thread
#---------------------------------------------------------------
def do_every (interval, worker_func, iterations = 0):
if iterations != 1:
threading.Timer (
interval,
do_every, [interval, worker_func, 0 if iterations == 0 else iterations-1]
).start ();
worker_func ();
#---------------------------------------------------------------
# gestione contatore
#---------------------------------------------------------------
def contatore():
try:
global cont
ctr = int(cont)
ctr +=1
ctr = ctr % 10000 # round robin 10000 eventi x track
cont = str(ctr)
except Exception as e:
print("errore incremento contatore \n\n")
print(str(e))
#---------------------------------------------------------------
# avvia porta parallela
#---------------------------------------------------------------
def avviaParallela():
global in_0
global in_1
global in_2
global in_3
global in_4
global in_5
global in_6
global in_7
global GPIO
try:
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
#GPIO.setup(out_0, GPIO.OUT) # output 0
#GPIO.setup(out_1, GPIO.OUT) # output 1
GPIO.setup(in_0, GPIO.IN) # input 0
GPIO.setup(in_1, GPIO.IN) # input 1
GPIO.setup(in_2, GPIO.IN) # input 2
GPIO.setup(in_3, GPIO.IN) # input 3
GPIO.setup(in_4, GPIO.IN) # input 4
GPIO.setup(in_5, GPIO.IN) # input 5
GPIO.setup(in_6, GPIO.IN) # input 6
GPIO.setup(in_7, GPIO.IN) # input 7
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n")
print str(e)
sys.exit(1)
print( "\n\n" + PROGRAM_NAME + " - init ok \n\n")
#---------------------------------------------------------------
#---------------------------------------------------------------
# MAIN
try:
config = ConfigParser.RawConfigParser()
config.read ( 'IOB.cfg' )
SAMPLETIME = config.getfloat ( 'time' , 'SAMPLETIME' )
TIMEOUTSHORT = config.getfloat ( 'time' , 'TIMEOUTSHORT' )
TIMEOUTLONG = config.getfloat ( 'time' , 'TIMEOUTLONG' )
SENDURLTIME = config.getfloat ( 'time' , 'SENDURLTIME' )
NMAXSEND = config.getint ( 'time' , 'NMAXSEND' )
idxMacchina = config.get ( 'id' , 'idxMacchina' )
URLBASE = config.get ( 'web' , 'URLBASE' )
URLENABLED = config.get('web' , 'URLENABLED')
URLALIVE = config.get ('web' , 'URLALIVE')
URLADV1 = config.get ( 'web' , 'URLADV1' )
LOGFILE = config.get ( 'log' , 'LOGFILE' )
LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' )
B_blinking[0] = config.getint ( 'blink' , 'bit0' )
B_blinking[1] = config.getint ( 'blink' , 'bit1' )
B_blinking[2] = config.getint ( 'blink' , 'bit2' )
B_blinking[3] = config.getint ( 'blink' , 'bit3' )
B_blinking[4] = config.getint ( 'blink' , 'bit4' )
B_blinking[5] = config.getint ( 'blink' , 'bit5' )
B_blinking[6] = config.getint ( 'blink' , 'bit6' )
B_blinking[7] = config.getint ( 'blink' , 'bit7' )
MAX_COUNTER_BLINK = config.getint ( 'blink' , 'MAX_COUNTER_BLINK' )
# cv 2.1 se bit = 1 allora inverto segnale in ingresso...
B_inverting[0] = config.getint ( 'invert' , 'bit0' )
B_inverting[1] = config.getint ( 'invert' , 'bit1' )
B_inverting[2] = config.getint ( 'invert' , 'bit2' )
B_inverting[3] = config.getint ( 'invert' , 'bit3' )
B_inverting[4] = config.getint ( 'invert' , 'bit4' )
B_inverting[5] = config.getint ( 'invert' , 'bit5' )
B_inverting[6] = config.getint ( 'invert' , 'bit6' )
B_inverting[7] = config.getint ( 'invert' , 'bit7' )
# cv 2.2 se bit = 1 allora filtro segnali brevi ...
B_filter[0] = config.getint ( 'filter' , 'bit0' )
B_filter[1] = config.getint ( 'filter' , 'bit1' )
B_filter[2] = config.getint ( 'filter' , 'bit2' )
B_filter[3] = config.getint ( 'filter' , 'bit3' )
B_filter[4] = config.getint ( 'filter' , 'bit4' )
B_filter[5] = config.getint ( 'filter' , 'bit5' )
B_filter[6] = config.getint ( 'filter' , 'bit6' )
B_filter[7] = config.getint ( 'filter' , 'bit7' )
MAX_COUNTER_FILTER = config.getint ( 'filter' , 'MAX_COUNTER_FILTER' )
except Exception as e:
print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg'
print str(e)
sys.exit(1)
#--------------------------------------------
# oggetto Logger
#--------------------------------------------
try:
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename=LOGFILE,
filemode='a'
)
# aggiungo 2 logger specifici x queue e send...
logQue = logging.getLogger('queue')
logSnd = logging.getLogger('sendUrl')
logPro = logging.getLogger('program')
except Exception as e:
# manda mail o simili - FARE!!!
print "LOG: Impossibile creare file log con nome"
print (LOGFILE)
print "\n\n"
print str(e)
#--------------------------------------------
print "\n\n" + PROGRAM_NAME + "\n\n"
global startstatus
startstatus = 1
if startstatus == 1:
logPro.info("Avvio Programma" + PROGRAM_NAME)
## Verifica l'OS e di conseguenza carica il file relativo con metodo di lockfile appropriato + check singola istanza
if os.name == 'posix':
import unix
else:
import win
logPro.info( "Start " + PROGRAM_NAME )
# lettura file configurazione
# [id]
# idxMacchina = 2001
# [time]
# SAMPLETIME = 0.1
# TIMEOUTSHORT = 200
# TIMEOUTLONG = 6000
print ( ' idxMacchina = %s' % ( idxMacchina ) )
print ( ' SAMPLETIME = %4.2f' % ( SAMPLETIME ) )
print ( ' TIMEOUTSHORT = %4.2f' % ( TIMEOUTSHORT ) )
print ( ' TIMEOUTLONG = %4.2f' % ( TIMEOUTLONG ) )
print ( ' SENDURLTIME = %4.2f' % ( SENDURLTIME ) )
print ( ' URLBASE = %s' % ( URLBASE ) )
print ( ' URLADV1 = %s' % ( URLADV1 ) )
print ( ' LOGFILE = %s' % ( LOGFILE ) )
print ( ' LOGLEVEL = %s' % ( LOGLEVEL ) )
# -sys.stdout.write ( 'idxMacchina ?' + idxMacchina + '\n')
to_short = TIMEOUTSHORT
to_long = TIMEOUTLONG
#--------------------------------------------------------------
# apertura parallela
try:
import RPi.GPIO as GPIO
except RuntimeError:
print( "\n\n" + PROGRAM_NAME + " - Error 1 - you need superuser privileges")
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 2 - you need superuser privileges. USE 'sudo' to run your script\n\n")
print str(e)
sys.exit(1)
avviaParallela()
#--------------------------------------------------------------
# MARCO: qui inserire avvio thread di "svuotaCoda"
# avviaSvuotaCoda
#print "Avvia svuota coda"
do_every ( SENDURLTIME , svuota_coda );
#---------------------------------------------------------------
# ciclo forever and ever
old = ''
#print "Avvio ciclo"
logPro.info("Avvio loop principale")
while 1:
try:
time.sleep (SAMPLETIME)
except Exception as e:
logPro.info("First_SLEEP: errore attesa sampletime")
logPro.error(str(e))
# lettura dati da IOB
value = readParallelaFiltrata()
if ( value != '' ) :
if value != old :
#loggo e invio dati
try:
logQue.info( value + ' ['+ cont +']')
errormsglen = 0
accoda()
contatore()
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda")
logPro.error(str(e))
pass
#enable e reset timer
to_enable = True
to_short = TIMEOUTSHORT
to_long = TIMEOUTLONG
old = value
# gestione timeout breve
if ( to_enable ) :
to_short = to_short - SAMPLETIME
if to_short <= 0:
#loggo e invio dati
try:
logQue.info( '>' + value + ' ['+ cont +']')
errormsglen = 0
accoda()
contatore()
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_short")
logPro.error(str(e))
pass
to_short = TIMEOUTSHORT
to_enable = False # dopo un colpo il timer breve viene disabilitato
to_long = TIMEOUTLONG
# gestione timeout lungo
to_long = to_long - SAMPLETIME
if to_long <= 0:
#loggo e invio dati
try:
logQue.info( '>>' + value + ' ['+ cont +']')
errormsglen = 0
accoda()
contatore()
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_long")
logPro.error(str(e))
pass
to_long = TIMEOUTLONG
+135
View File
@@ -0,0 +1,135 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# sendReboot v. 1.8
# - (2.5.2) Fix gestione eccezioni con report dettagliato
#---------------------------------------------------------------
import time
import sys
from datetime import datetime
import urllib
import ConfigParser
import os, sys
import logging
import time
#---------------------------------------------------------------
# COSTANTI
SR_PROG_NAME = "SendReboot IOB-pi v.2.5.2"
# DA FILE CONF
idxMacchina = "99"
# registro se ho fatto chiamata
global numTry
numTry = 1
#---------------------------------------------------------------
#Funzione di scrittura su url con try-except
#---------------------------------------------------------------
def chiamaUrl(numTry):
try:
urllib.urlopen ( url )
numTry = numTry + 10
except Exception as e:
print("Errore in chiamaUrl")
print(str(e))
logging.info ( str(e) )
print("Url chiamato: " , url)
return numTry
#---------------------------------------------------------------
# Funzione di recupero mac address per poterlo inviare a MPIO
#---------------------------------------------------------------
def getMAC(interface):
# Return the MAC address of interface
try:
str = open('/sys/class/net/' + interface + '/address').read()
except:
str = "00:00:00:00:00:00"
return str[0:17]
#---------------------------------------------------------------
# MAIN
#---------------------------------------------------------------
try:
config = ConfigParser.RawConfigParser()
config.read ( 'IOB.cfg' )
idxMacchina = config.get ( 'id' , 'idxMacchina' )
URLREBO = config.get ( 'web' , 'URLREBO' )
LOGFILE = config.get ( 'log' , 'LOGREBO' )
except Exception as e:
print("\n\n" + SR_PROG_NAME + ' - Error 4 - in config file ' 'IOB.cfg')
print(str(e))
sys.exit(1)
#--------------------------------------------
# oggetto Logger
#--------------------------------------------
try:
# log = Logger(LOGFILE)
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename=LOGFILE,
filemode='a')
except Exception as e:
# manda mail o simili - FARE!!!
print("LOG: Impossibile creare file log con nome ")
print(LOGFILE)
print(str(e))
#--------------------------------------------
print("\n\n" + SR_PROG_NAME + "\n\n")
global startstatus
startstatus = 1
if startstatus == 1:
logging.info("Avvio Programma " + SR_PROG_NAME)
# lettura file configurazione
print ( ' idxMacchina = %s' % ( idxMacchina ) )
print ( ' URLREBO = %s' % ( URLREBO ) )
print ( ' LOGFILE = %s' % ( LOGFILE ) )
# lettura mac address
myMac = getMAC('eth0')
print ( ' MAC Address = %s' % ( myMac ) )
# configuro URL da inviare
url = URLREBO + idxMacchina + "&mac=" + myMac
# modifica: cerco se ho inviato segnale altrimenti ritento invio...
while (numTry < 11):
logging.info("Tentativo invio URL: $numTry" )
numTry = chiamaUrl(numTry)
time.sleep(3)
numTry = numTry + 1
# registro che ho inviato!
logging.info("Inviato segnale di reboot!: " + url )
+248
View File
@@ -0,0 +1,248 @@
#!/bin/bash
# script per update IOB-PI (filre readParallela) secondo la tipologia del raspberry tra 8 e 12 ingressi
revNum=`awk '/^Revision/ {sub("^1000", "", $3); print $3}' /proc/cpuinfo`
anno=2000
model='na'
ram=0
# decodifica da questa tabella: https://elinux.org/RPi_HardwareHistory e https://ozzmaker.com/check-raspberry-software-hardware-version-command-line
case $revNum in
0002 | 0003 | 0004 | 0005 | 0006)
anno='2012'
model='B'
ram=256
;;
0007 | 0008 | 0009)
anno='2013'
model='A'
ram=256
;;
000d | 000e | 000f)
anno='2012'
model='B'
ram=512
;;
0010)
anno='2014'
model='B+'
ram=512
;;
0011)
anno='2014'
model='CM1'
ram=512
;;
0012)
anno='2014'
model='A+'
ram=256
;;
0013)
anno='2015'
model='B+'
ram=512
;;
0014)
anno='2014'
model='CM1'
ram=512
;;
0015)
anno='2014'
model='A+'
ram=512
;;
a01040 | a01041 | a21042)
anno='2015'
model='2 Model B'
ram=1024
;;
a22042)
anno='2016'
model='2 Model B'
ram=1024
;;
900021)
anno='2016'
model='A+'
ram=512
;;
900032)
anno='2016'
model='B+'
ram=512
;;
900092)
anno='2015'
model='Zero'
ram=512
;;
900093 | 920093)
anno='2016'
model='Zero'
ram=512
;;
9000c1)
anno='2017'
model='Zero W'
ram=512
;;
a02082 | a22082 | a22082 | a32082)
anno='2016'
model='3 Model B'
ram=1024
;;
a020a0)
anno='2017'
model='CM3'
ram=1024
;;
a020d3)
anno='2018'
model='3 Model B+'
ram=1024
;;
9020e0)
anno='2018'
model='3 Model A+'
ram=512
;;
a02100)
anno='2019'
model='CM3'
ram=1024
;;
a03111)
anno='2019'
model='4 Model B'
ram=1024
;;
b03111 | b03112)
anno='2019'
model='4 Model B'
ram=2048
;;
b03114)
anno='2020'
model='4 Model B'
ram=2048
;;
b03115)
anno='2022'
model='4 Model B'
ram=2048
;;
c03111 | c03112)
anno='2019'
model='4 Model B'
ram=4096
;;
c03114)
anno='2020'
model='4 Model B'
ram=4096
;;
c03115)
anno='2022'
model='4 Model B'
ram=2048
;;
d03114)
anno='2020'
model='4 Model B'
ram=8192
;;
d03115)
anno='2022'
model='4 Model B'
ram=8192
;;
902120)
anno='2021'
model='Zero 2 W'
ram=512
;;
*)
anno='2000'
model='Unknown'
ram=128
;;
esac
echo "RPI $anno | model $model | RAM $ram"
echo "Revisione: $revNum"
# default a 8 IN...
selIn=8
# verifico anno/ram, se almeno 2014 e 1gb --> 12 bit...
if [ $anno -gt 2015 ] && [ $ram -gt 512 ]; then
selIn=12
fi
echo "Scelta versione $selIn ingressi"
# fermo esecuzione...
/etc/init.d/MapoIOB stop
echo "Arrestato servizio..."
# mv file readParallela.py corrente...
mv readParallela.py readParallela_$(date -d "today" +"%Y%m%d").py
# secondo tipo copio il file corretto
if [ $selIn -eq 8 ]; then
cp -f readParallela_8.py readParallela.py
else
cp -f readParallela_12.py readParallela.py
fi
# fix permessi
chown pi: *
chmod +x readP*
# riavvio esecuzione...
/etc/init.d/MapoIOB restart
echo "Modifiche effettuate..."
echo "Attenzione: verificare effettiva partenza servizio, per farlo digitare il comando"
echo "/etc/init.d/MapoIOB restart"
echo "--------------------------------"
echo "In particolare il file IOB.cfg deve contenere NMAXSEND = 5 nella sezione [time]"
echo "--------------------------------"
echo "Inoltre verificare presenza sezioni [blink] [invert] [filter]"
echo "--------------------------------"
+37 -24
View File
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# readParallela v. 2.5.1
# readParallela v. 2.5.2 12 Ingressi
# - single instance timer
# - invio multiplo x send eventi accodati
# - gestione segnali BLINKING
@@ -12,6 +12,7 @@
# - (2.4.8) versione adatta a raspberry PI vecchia generazione (GPIO corto, 8bit)
# - (2.5) Fix (hope) ciclo "wait send to complete", gestione timeout (rety infinito se IO riparte in modo anomalo)
# - (2.5.1) Fix numero versione 18.05.2023
# - (2.5.2) Fix gestione eccezioni con report dettagliato
#---------------------------------------------------------------
# levare locking
@@ -46,7 +47,7 @@ MAXRETRY = 10
# numero campioni filtraggio segnale ballerino
MAX_COUNTER_BLINK = 10
PROGRAM_NAME ="ReadPar IOB-pi v.2.5.1"
PROGRAM_NAME ="ReadPar IOB-pi v.2.5.2"
# DA FILE CONF
idxMacchina = "1001"
@@ -214,7 +215,7 @@ def readParallelaFiltrata():
#ciclo per ogni segnale
for i in xrange(12) :
# print (i)
#print (i)
# v2.1 gestione inversione bit ingresso
@@ -339,7 +340,9 @@ def readParallelaFiltrata():
current = hex( new_value ).replace ( "0x" , "" ).upper()
except:
except Exception as e:
print "Errore in readParallelaFiltrata \n\n"
print str(e)
pass
return current
@@ -355,10 +358,9 @@ def accoda():
except Queue.Full:
logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` )
except:
except Exception as e:
logPro.error( "NETWORK:Errore http-no com rete-timeout" + url )
#print "Url aforte" , url
logPro.error(str(e))
#--------------------------------------------------------------
# svuotaCoda x invio dati al server
@@ -450,16 +452,17 @@ def svuota_coda():
sending = '0'
to_retry = MAXRETRY
logPro.info("END WAIT, reset to_retry var")
else:
pass
else:
pass
except:
except Exception as e:
if onLine == '1':
logPro.error("Server Non raggiungibile")
logPro.error(str(e))
#print "Non raggiungibile"
onLine = '0'
@@ -496,8 +499,9 @@ def contatore():
ctr +=1
ctr = ctr % 10000 # round robin 10000 eventi x track
cont = str(ctr)
except:
print("errore incremento contatore")
except Exception as e:
print("errore incremento contatore \n\n")
print(str(e))
#---------------------------------------------------------------
# avvia porta parallela
@@ -541,8 +545,9 @@ def avviaParallela():
GPIO.setup(in_10, GPIO.IN) # input 10
GPIO.setup(in_11, GPIO.IN) # input 11
except:
print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n")
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n")
print str(e)
sys.exit(1)
@@ -598,7 +603,7 @@ try:
B_inverting[4] = config.getint ( 'invert' , 'bit4' )
B_inverting[5] = config.getint ( 'invert' , 'bit5' )
B_inverting[6] = config.getint ( 'invert' , 'bit6' )
B_inverting[7] = config.getint ( 'invert' , 'bit7' )
B_inverting[7] = config.getint ( 'invert' , 'bit7' )
B_inverting[8] = config.getint ( 'invert' , 'bit8' )
B_inverting[9] = config.getint ( 'invert' , 'bit9' )
B_inverting[10] = config.getint ( 'invert' , 'bit10' )
@@ -613,7 +618,7 @@ try:
B_filter[4] = config.getint ( 'filter' , 'bit4' )
B_filter[5] = config.getint ( 'filter' , 'bit5' )
B_filter[6] = config.getint ( 'filter' , 'bit6' )
B_filter[7] = config.getint ( 'filter' , 'bit7' )
B_filter[7] = config.getint ( 'filter' , 'bit7' )
B_filter[8] = config.getint ( 'filter' , 'bit8' )
B_filter[9] = config.getint ( 'filter' , 'bit9' )
B_filter[10] = config.getint ( 'filter' , 'bit10' )
@@ -622,8 +627,9 @@ try:
MAX_COUNTER_FILTER = config.getint ( 'filter' , 'MAX_COUNTER_FILTER' )
except:
except Exception as e:
print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg'
print str(e)
sys.exit(1)
#--------------------------------------------
@@ -642,10 +648,12 @@ try:
logSnd = logging.getLogger('sendUrl')
logPro = logging.getLogger('program')
except:
except Exception as e:
# manda mail o simili - FARE!!!
print "LOG: Impossibile creare file log con nome "
print "LOG: Impossibile creare file log con nome"
print (LOGFILE)
print "\n\n"
print str(e)
#--------------------------------------------
@@ -699,8 +707,9 @@ try:
import RPi.GPIO as GPIO
except RuntimeError:
print( "\n\n" + PROGRAM_NAME + " - Error 1 - you need superuser privileges")
except:
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 2 - you need superuser privileges. USE 'sudo' to run your script\n\n")
print str(e)
sys.exit(1)
@@ -726,8 +735,9 @@ while 1:
try:
time.sleep (SAMPLETIME)
except:
logPro.info("First_SLEEP: errore attesa sampletime")
except Exception as e:
logPro.info("First_SLEEP: errore attesa sampletime")
logPro.error(str(e))
# lettura dati da IOB
value = readParallelaFiltrata()
@@ -740,8 +750,9 @@ while 1:
errormsglen = 0
accoda()
contatore()
except:
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda")
logPro.error(str(e))
pass
#enable e reset timer
to_enable = True
@@ -761,8 +772,9 @@ while 1:
errormsglen = 0
accoda()
contatore()
except:
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_short")
logPro.error(str(e))
pass
to_short = TIMEOUTSHORT
to_enable = False # dopo un colpo il timer breve viene disabilitato
@@ -777,7 +789,8 @@ while 1:
errormsglen = 0
accoda()
contatore()
except:
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_long")
logPro.error(str(e))
pass
to_long = TIMEOUTLONG
+41 -36
View File
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# sendReboot v. 1.8
# - (2.5.2) Fix gestione eccezioni con report dettagliato
#---------------------------------------------------------------
@@ -23,7 +23,7 @@ import time
#---------------------------------------------------------------
# COSTANTI
PROGRAM_NAME = "SendReboot IOB-pi v.1.8"
SR_PROG_NAME = "SendReboot IOB-pi v.2.5.2"
# DA FILE CONF
idxMacchina = "99"
@@ -39,44 +39,48 @@ numTry = 1
def chiamaUrl(numTry):
try:
urllib.urlopen ( url )
numTry = numTry + 10
except Exception, e:
print e
logging.info ( e )
print "Url aforte" , url
return numTry
try:
urllib.urlopen ( url )
numTry = numTry + 10
except Exception as e:
print("Errore in chiamaUrl")
print(str(e))
logging.info ( str(e) )
print("Url chiamato: " , url)
return numTry
#---------------------------------------------------------------
# Funzione di recupero mac address per poterlo inviare a MPIO
#---------------------------------------------------------------
def getMAC(interface):
# Return the MAC address of interface
try:
str = open('/sys/class/net/' + interface + '/address').read()
except:
str = "00:00:00:00:00:00"
return str[0:17]
# Return the MAC address of interface
try:
str = open('/sys/class/net/' + interface + '/address').read()
except:
str = "00:00:00:00:00:00"
return str[0:17]
#---------------------------------------------------------------
# MAIN
#---------------------------------------------------------------
try:
config = ConfigParser.RawConfigParser()
config.read ( 'IOB.cfg' )
config = ConfigParser.RawConfigParser()
config.read ( 'IOB.cfg' )
idxMacchina = config.get ( 'id' , 'idxMacchina' )
idxMacchina = config.get ( 'id' , 'idxMacchina' )
URLREBO = config.get ( 'web' , 'URLREBO' )
URLREBO = config.get ( 'web' , 'URLREBO' )
LOGFILE = config.get ( 'log' , 'LOGREBO' )
except:
print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg'
sys.exit(1)
LOGFILE = config.get ( 'log' , 'LOGREBO' )
except Exception as e:
print("\n\n" + SR_PROG_NAME + ' - Error 4 - in config file ' 'IOB.cfg')
print(str(e))
sys.exit(1)
#--------------------------------------------
@@ -84,26 +88,27 @@ except:
#--------------------------------------------
try:
# log = Logger(LOGFILE)
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename=LOGFILE,
filemode='a')
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename=LOGFILE,
filemode='a')
except:
# manda mail o simili - FARE!!!
print "LOG: Impossibile creare file log con nome "
print (LOGFILE)
except Exception as e:
# manda mail o simili - FARE!!!
print("LOG: Impossibile creare file log con nome ")
print(LOGFILE)
print(str(e))
#--------------------------------------------
print "\n\n" + PROGRAM_NAME + "\n\n"
print("\n\n" + SR_PROG_NAME + "\n\n")
global startstatus
startstatus = 1
if startstatus == 1:
logging.info("Avvio Programma " + PROGRAM_NAME)
logging.info("Avvio Programma " + SR_PROG_NAME)
# lettura file configurazione
@@ -120,7 +125,7 @@ url = URLREBO + idxMacchina + "&mac=" + myMac
# modifica: cerco se ho inviato segnale altrimenti ritento invio...
while (numTry < 11):
logging.info("Tentativo invio URL: " + `numTry` )
logging.info("Tentativo invio URL: $numTry" )
numTry = chiamaUrl(numTry)
time.sleep(3)
numTry = numTry + 1
+2 -2
View File
@@ -1,8 +1,8 @@
#! /bin/bash
### BEGIN INIT INFO
# Provides: MapoIOB: script Steamware per avvio driver IOB
# Required-Start: $remote_fs $syslog ramlog
# Required-Stop: $remote_fs $syslog ramlog
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Steamware's MapoIOB driver
+35 -22
View File
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# readParallela v. 2.5.1
# readParallela v. 2.5.2 8 Ingressi
# - single instance timer
# - invio multiplo x send eventi accodati
# - gestione segnali BLINKING
@@ -12,6 +12,7 @@
# - (2.4.8) versione adatta a raspberry PI vecchia generazione (GPIO corto, 8bit)
# - (2.5) Fix (hope) ciclo "wait send to complete", gestione timeout (rety infinito se IO riparte in modo anomalo)
# - (2.5.1) Fix numero versione 18.05.2023
# - (2.5.2) Fix gestione eccezioni con report dettagliato
#---------------------------------------------------------------
# levare locking
@@ -46,7 +47,7 @@ MAXRETRY = 10
# numero campioni filtraggio segnale ballerino
MAX_COUNTER_BLINK = 10
PROGRAM_NAME ="ReadPar IOB-pi v.2.5.1"
PROGRAM_NAME ="ReadPar IOB-pi v.2.5.2"
# DA FILE CONF
idxMacchina = "1001"
@@ -296,7 +297,9 @@ def readParallelaFiltrata():
current = hex( new_value ).replace ( "0x" , "" ).upper()
except:
except Exception as e:
print "Errore in readParallelaFiltrata \n\n"
print str(e)
pass
return current
@@ -312,10 +315,9 @@ def accoda():
except Queue.Full:
logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` )
except:
except Exception as e:
logPro.error( "NETWORK:Errore http-no com rete-timeout" + url )
#print "Url aforte" , url
logPro.error(str(e))
#--------------------------------------------------------------
# svuotaCoda x invio dati al server
@@ -414,9 +416,10 @@ def svuota_coda():
else:
pass
except:
except Exception as e:
if onLine == '1':
logPro.error("Server Non raggiungibile")
logPro.error(str(e))
#print "Non raggiungibile"
onLine = '0'
@@ -453,8 +456,9 @@ def contatore():
ctr +=1
ctr = ctr % 10000 # round robin 10000 eventi x track
cont = str(ctr)
except:
print("errore incremento contatore")
except Exception as e:
print("errore incremento contatore \n\n")
print(str(e))
#---------------------------------------------------------------
# avvia porta parallela
@@ -490,8 +494,9 @@ def avviaParallela():
GPIO.setup(in_6, GPIO.IN) # input 6
GPIO.setup(in_7, GPIO.IN) # input 7
except:
print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n")
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n")
print str(e)
sys.exit(1)
@@ -543,7 +548,7 @@ try:
B_inverting[4] = config.getint ( 'invert' , 'bit4' )
B_inverting[5] = config.getint ( 'invert' , 'bit5' )
B_inverting[6] = config.getint ( 'invert' , 'bit6' )
B_inverting[7] = config.getint ( 'invert' , 'bit7' )
B_inverting[7] = config.getint ( 'invert' , 'bit7' )
# cv 2.2 se bit = 1 allora filtro segnali brevi ...
@@ -554,13 +559,14 @@ try:
B_filter[4] = config.getint ( 'filter' , 'bit4' )
B_filter[5] = config.getint ( 'filter' , 'bit5' )
B_filter[6] = config.getint ( 'filter' , 'bit6' )
B_filter[7] = config.getint ( 'filter' , 'bit7' )
B_filter[7] = config.getint ( 'filter' , 'bit7' )
MAX_COUNTER_FILTER = config.getint ( 'filter' , 'MAX_COUNTER_FILTER' )
except:
except Exception as e:
print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg'
print str(e)
sys.exit(1)
#--------------------------------------------
@@ -579,10 +585,12 @@ try:
logSnd = logging.getLogger('sendUrl')
logPro = logging.getLogger('program')
except:
except Exception as e:
# manda mail o simili - FARE!!!
print "LOG: Impossibile creare file log con nome "
print "LOG: Impossibile creare file log con nome"
print (LOGFILE)
print "\n\n"
print str(e)
#--------------------------------------------
@@ -636,8 +644,9 @@ try:
import RPi.GPIO as GPIO
except RuntimeError:
print( "\n\n" + PROGRAM_NAME + " - Error 1 - you need superuser privileges")
except:
except Exception as e:
print( "\n\n" + PROGRAM_NAME + " - Error 2 - you need superuser privileges. USE 'sudo' to run your script\n\n")
print str(e)
sys.exit(1)
@@ -663,8 +672,9 @@ while 1:
try:
time.sleep (SAMPLETIME)
except:
logPro.info("First_SLEEP: errore attesa sampletime")
except Exception as e:
logPro.info("First_SLEEP: errore attesa sampletime")
logPro.error(str(e))
# lettura dati da IOB
value = readParallelaFiltrata()
@@ -677,8 +687,9 @@ while 1:
errormsglen = 0
accoda()
contatore()
except:
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda")
logPro.error(str(e))
pass
#enable e reset timer
to_enable = True
@@ -698,8 +709,9 @@ while 1:
errormsglen = 0
accoda()
contatore()
except:
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_short")
logPro.error(str(e))
pass
to_short = TIMEOUTSHORT
to_enable = False # dopo un colpo il timer breve viene disabilitato
@@ -714,7 +726,8 @@ while 1:
errormsglen = 0
accoda()
contatore()
except:
except Exception as e:
logPro.error("URLBROWSER: errore registrazione valore e accoda TO_long")
logPro.error(str(e))
pass
to_long = TIMEOUTLONG
+41 -36
View File
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# sendReboot v. 1.8
# - (2.5.2) Fix gestione eccezioni con report dettagliato
#---------------------------------------------------------------
@@ -23,7 +23,7 @@ import time
#---------------------------------------------------------------
# COSTANTI
PROGRAM_NAME = "SendReboot IOB-pi v.1.8"
SR_PROG_NAME = "SendReboot IOB-pi v.2.5.2"
# DA FILE CONF
idxMacchina = "99"
@@ -39,44 +39,48 @@ numTry = 1
def chiamaUrl(numTry):
try:
urllib.urlopen ( url )
numTry = numTry + 10
except Exception, e:
print e
logging.info ( e )
print "Url aforte" , url
return numTry
try:
urllib.urlopen ( url )
numTry = numTry + 10
except Exception as e:
print("Errore in chiamaUrl")
print(str(e))
logging.info ( str(e) )
print("Url chiamato: " , url)
return numTry
#---------------------------------------------------------------
# Funzione di recupero mac address per poterlo inviare a MPIO
#---------------------------------------------------------------
def getMAC(interface):
# Return the MAC address of interface
try:
str = open('/sys/class/net/' + interface + '/address').read()
except:
str = "00:00:00:00:00:00"
return str[0:17]
# Return the MAC address of interface
try:
str = open('/sys/class/net/' + interface + '/address').read()
except:
str = "00:00:00:00:00:00"
return str[0:17]
#---------------------------------------------------------------
# MAIN
#---------------------------------------------------------------
try:
config = ConfigParser.RawConfigParser()
config.read ( 'IOB.cfg' )
config = ConfigParser.RawConfigParser()
config.read ( 'IOB.cfg' )
idxMacchina = config.get ( 'id' , 'idxMacchina' )
idxMacchina = config.get ( 'id' , 'idxMacchina' )
URLREBO = config.get ( 'web' , 'URLREBO' )
URLREBO = config.get ( 'web' , 'URLREBO' )
LOGFILE = config.get ( 'log' , 'LOGREBO' )
except:
print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg'
sys.exit(1)
LOGFILE = config.get ( 'log' , 'LOGREBO' )
except Exception as e:
print("\n\n" + SR_PROG_NAME + ' - Error 4 - in config file ' 'IOB.cfg')
print(str(e))
sys.exit(1)
#--------------------------------------------
@@ -84,26 +88,27 @@ except:
#--------------------------------------------
try:
# log = Logger(LOGFILE)
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename=LOGFILE,
filemode='a')
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
filename=LOGFILE,
filemode='a')
except:
# manda mail o simili - FARE!!!
print "LOG: Impossibile creare file log con nome "
print (LOGFILE)
except Exception as e:
# manda mail o simili - FARE!!!
print("LOG: Impossibile creare file log con nome ")
print(LOGFILE)
print(str(e))
#--------------------------------------------
print "\n\n" + PROGRAM_NAME + "\n\n"
print("\n\n" + SR_PROG_NAME + "\n\n")
global startstatus
startstatus = 1
if startstatus == 1:
logging.info("Avvio Programma " + PROGRAM_NAME)
logging.info("Avvio Programma " + SR_PROG_NAME)
# lettura file configurazione
@@ -120,7 +125,7 @@ url = URLREBO + idxMacchina + "&mac=" + myMac
# modifica: cerco se ho inviato segnale altrimenti ritento invio...
while (numTry < 11):
logging.info("Tentativo invio URL: " + `numTry` )
logging.info("Tentativo invio URL: $numTry" )
numTry = chiamaUrl(numTry)
time.sleep(3)
numTry = numTry + 1
+1 -1
View File
@@ -1 +1 @@
0.8.
0.9.
+1 -1
View File
@@ -1 +1 @@
0.8.2307.2416
0.9.2409.1809
+4 -1
View File
@@ -38,8 +38,11 @@ namespace SMGen.Data
return clonedData;
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (obj == null)
return false;
if (!(obj is SelectFamIngParams item))
return false;
+4 -1
View File
@@ -38,8 +38,11 @@ namespace SMGen.Data
return clonedData;
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (obj == null)
return false;
if (!(obj is SelectFamStatiParams item))
return false;
+4 -1
View File
@@ -38,8 +38,11 @@ namespace SMGen.Data
return clonedData;
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (obj == null)
return false;
if (!(obj is SelectRulFixParams item))
return false;
+4 -1
View File
@@ -38,8 +38,11 @@ namespace SMGen.Data
return clonedData;
}
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
if (obj == null)
return false;
if (!(obj is SelectSMIn2EvParams item))
return false;
-3
View File
@@ -13,9 +13,6 @@ namespace SMGen.Data
{
public partial class SMGDataContext : DbContext
{
public SMGDataContext()
{ }
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
private IConfiguration _configuration;
+177 -22
View File
@@ -368,6 +368,142 @@ namespace SMGen.Data.Services
private Dictionary<string, int> Events_to_send { get; set; } = new Dictionary<string, int>();
private List<string> States { get; set; } = new List<string>();
private List<TransizioneIngressiModelTemp> TranInList2add { get; set; } = new List<TransizioneIngressiModelTemp>();
/// <summary>
/// Verifica su DB eventi e stati
/// </summary>
/// <param name="currFile"></param>
/// <returns></returns>
public async Task<FileLinesClass> DoCheckUnusedEv(FilesClass currFile)
{
await Task.Delay(1);
States.Clear();
Bits.Clear();
Events_to_send.Clear();
Rules.Clear();
eventsAll.Clear();
evOk.Clear();
StatesAll.Clear();
string lineOk = "";
// recupero nome file x partire
string filePath = currFile.tempFileName;
FileLinesClass answ = new FileLinesClass();
string[] lines = File.ReadAllLines(filePath, Encoding.UTF8);
try
{
foreach (var line in lines)
{
lineOk = line.Trim();
if (!lineOk.StartsWith("#") && !string.IsNullOrEmpty(lineOk) && lineOk.Length >= 3)
{
if (lineOk.Contains("#"))
{
var lineSplit = lineOk.Split("#");
lineOk = lineSplit[0];
}
var sz_tokens = lineOk.Split(":");
var sz_temp = sz_tokens[0].Trim();
switch (sz_temp)
{
case "$DEFINITIONS":
b_rules_definition = false;
break;
case "$NAME":
break;
case "$IDX":
break;
case "$STATE":
if (!StatesAll.ContainsKey(sz_tokens[2].Trim().ToUpper()))
{
StatesAll.Add(sz_tokens[2].Trim().ToUpper(), int.Parse(sz_tokens[1].Trim().ToUpper()));
}
break;
case "$EVENT":
if (!Events_to_send.ContainsValue(int.Parse(sz_tokens[1].Trim().ToUpper())))
{
Events_to_send.Add(sz_tokens[2].Trim().ToUpper(), int.Parse(sz_tokens[1].Trim().ToUpper()));
}
var newEvent = new AnagEventiModelTemp()
{
IdxTipo = int.Parse(sz_tokens[1].Trim().ToUpper()),
Nome = sz_tokens[2].Trim().ToUpper()
};
break;
case "$RULES":
b_rules_definition = true;
break;
case "$DO":
b_rules_definition = false;
break;
default:
if (b_rules_definition)
{
var state = sz_temp.Trim().ToUpper();
var event_to_send = sz_tokens[1].Trim().ToUpper();
var next_state = sz_tokens[2].Trim().ToUpper();
var temp_rule = new RuleClass()
{
state = state,
event_to_send = event_to_send,
next_state = next_state
};
Rules.Add(temp_rule);
States2Rules.Add(next_state);
}
break;
}
}
else
{
//linesChecked.Add(line, true);
}
}
foreach (var item in States2Rules)
{
if (!StatesAll2.ContainsKey(item))
{
StatesAll2.Add(item, StatesAll[item]);
}
}
foreach (var ev in Events_to_send)
{
var rule2Ev = Rules.FirstOrDefault(x => x.event_to_send == ev.Key);
if (rule2Ev != null)
{
if (!evOk.ContainsKey(ev.Key) && !evOk.ContainsValue(ev.Value))
{
evOk.Add(ev.Key, ev.Value);
}
}
}
}
catch (Exception exc)
{
Log.Error($"{exc}{Environment.NewLine}");
}
answ.file = currFile.tempFileName;
answ.statesOK = StatesAll2;
answ.eventsOK = evOk;
answ.lines = lines.ToList();
return answ;
}
/// <summary>
/// Verifica su DB eventi e stati
/// </summary>
/// <param name="currFile"></param>
/// <returns></returns>
public async Task<FileLinesClass> DoCheckUnusedEvSt(FilesClass currFile)
{
await Task.Delay(1);
@@ -492,17 +628,15 @@ namespace SMGen.Data.Services
return answ;
}
/// <summary>
/// Valuta un file di ruoles x ingressi 2 eventi e restituisce esito
/// </summary>
/// <param name="currFile">Path file *.rul da processare</param>
/// <param name="saveToDb">Indica se salvare sul DB</param>
/// <param name="doProcState">Indica se processare parte state (x state machine stati)</param>
/// <returns></returns>
///
public async Task<FilesClass> EvalIn2EvRuleFile(FilesClass currFile, bool saveToDb)
public async Task<FilesClass> EvalIn2EvRuleFile(FilesClass currFile, bool saveToDb, bool doProcState)
{
await Task.Delay(1);
Dictionary<string, string> evSt2Change = new Dictionary<string, string>();
@@ -542,7 +676,7 @@ namespace SMGen.Data.Services
var sz_tokens = line.Split(":");
var sz_temp = sz_tokens[0].Trim();
var sz_temp = sz_tokens[0].Trim().ToUpper();
switch (sz_temp)
{
case "$DEFINITIONS":
@@ -637,7 +771,7 @@ namespace SMGen.Data.Services
}
}
evSt2Change = await modFile(currFile, false);
evSt2Change = await modFile(currFile, false, doProcState);
if (evSt2Change.Count() == 0)
{
@@ -708,8 +842,14 @@ namespace SMGen.Data.Services
return currFile;
}
public async Task<Dictionary<string, string>> modFile(FilesClass file, bool doProc)
/// <summary>
/// Modifica il file in oggetto
/// </summary>
/// <param name="file"></param>
/// <param name="doProc"></param>
/// <param name="doProcState">Necessaria modifica stati (x state machine stati)</param>
/// <returns></returns>
public async Task<Dictionary<string, string>> modFile(FilesClass file, bool doProc, bool doProcState)
{
Dictionary<string, string> evSt2Change = new Dictionary<string, string>();
@@ -727,19 +867,22 @@ namespace SMGen.Data.Services
{
if (!line.StartsWith("$EVENT") && !line.StartsWith("#") && line.StartsWith("$STATE"))
{
var lineSplit = line.Split(":");
if (lineSplit.Count() >= 3)
if (doProcState)
{
if (!statesFromDb.ContainsKey(int.Parse(lineSplit[1].Trim())))
var lineSplit = line.Split(":");
if (lineSplit.Count() >= 3)
{
errMsg = $"Lo stato {lineSplit[1].Trim()}: {lineSplit[2].Trim()} non è presente in AnagraficaStati sul DB";
file.errorMsgs.Add(errMsg);
file.isOk = false;
}
else if (statesFromDb[int.Parse(lineSplit[1].Trim())] != lineSplit[2].Trim())
{
fileTxt = fileTxt.Replace(lineSplit[2].Trim(), statesFromDb[int.Parse(lineSplit[1].Trim())]);
evSt2Change.Add(lineSplit[2].Trim(), lineSplit[0].Trim());
if (!statesFromDb.ContainsKey(int.Parse(lineSplit[1].Trim())))
{
errMsg = $"Lo stato {lineSplit[1].Trim()}: {lineSplit[2].Trim()} non è presente in AnagraficaStati sul DB";
file.errorMsgs.Add(errMsg);
file.isOk = false;
}
else if (statesFromDb[int.Parse(lineSplit[1].Trim())] != lineSplit[2].Trim())
{
fileTxt = fileTxt.Replace(lineSplit[2].Trim(), statesFromDb[int.Parse(lineSplit[1].Trim())]);
evSt2Change.Add(lineSplit[2].Trim(), lineSplit[0].Trim());
}
}
}
}
@@ -756,6 +899,12 @@ namespace SMGen.Data.Services
}
else if (eventsFromDb[int.Parse(lineSplit[1].Trim())] != lineSplit[2].Trim())
{
#if false
// definisco i token con spazi prima e dopo x evitare sostituzione token "esempio" ed "esempio_01"...
string sOrig = $" {lineSplit[2].Trim()} ";
string sDest = $" {eventsFromDb[int.Parse(lineSplit[1].Trim())]} ";
fileTxt = fileTxt.Replace(sOrig, sDest);
#endif
fileTxt = fileTxt.Replace(lineSplit[2].Trim(), eventsFromDb[int.Parse(lineSplit[1].Trim())]);
evSt2Change.Add(lineSplit[2].Trim(), lineSplit[0].Trim());
}
@@ -793,8 +942,12 @@ namespace SMGen.Data.Services
/// </summary>
/// <param name="currFile">Path file *.rul da processare</param>
/// <param name="saveToDb">Indica se salvare sul DB</param>
/// <param name="calcItself"></param>
/// <param name="calcEmptyState"></param>
/// <param name="orderType"></param>
/// <param name="doProcState">Indica se processare parte state (x state machine stati)</param>
/// <returns></returns>
public async Task<FilesClass> EvalIn2StateRuleFile(FilesClass currFile, bool saveToDb, bool calcItself, bool calcEmptyState, Core.Enum.ORDERTYPE orderType)
public async Task<FilesClass> EvalIn2StateRuleFile(FilesClass currFile, bool saveToDb, bool calcItself, bool calcEmptyState, Core.Enum.ORDERTYPE orderType, bool doProcState)
{
await Task.Delay(1);
Dictionary<string, string> evSt2Change = new Dictionary<string, string>();
@@ -940,7 +1093,7 @@ namespace SMGen.Data.Services
Log.Error($"Eccezione durante la lettura del file {currFile.origFileName} alla riga {line}: {exc}{Environment.NewLine}");
}
evSt2Change = await modFile(currFile, false);
evSt2Change = await modFile(currFile, false, doProcState);
if (evSt2Change.Count() == 0)
{
@@ -1060,7 +1213,9 @@ namespace SMGen.Data.Services
{
for (var i = 0; i <= n_states - 1; i++)
{
sz_actual_state = Events_to_send.FirstOrDefault(x => x.Value == i).Key;
// verificare qui: non dovrebbe essere vente_to_send ma stati!!!!
//sz_actual_state = Events_to_send.FirstOrDefault(x => x.Value == i).Key;
sz_actual_state = StatesAll.FirstOrDefault(x => x.Value == i).Key;
//ciclo negli ingressi
for (n_input = 0; n_input <= (Math.Pow(2, n_bits) - 1); n_input++)
+80 -71
View File
@@ -21,87 +21,96 @@
</tr>
</thead>
<tbody>
@foreach (var item in Files)
@if (Files == null || Files.Count == 0)
{
<tr>
<td scope="row">@item.Key</td>
@if (item.Value.isOk)
{
<td class="text-success"><i class="fa-solid fa-circle-check"></i></td>
<td>
<a href="Download?fileName=@item.Value.DLoadFileName" target="_blank" class="btn btn-sm bg-success"><i class="fa-solid fa-download"></i></a>
</td>
<td colspan="5">
<div class="alert alert-warning fs-4">Nessun file trovato</div>
</td>
}
else
{
foreach (var item in Files)
{
<tr>
<td scope="row">@item.Key</td>
@if (item.Value.isOk)
{
<td class="text-success"><i class="fa-solid fa-circle-check"></i></td>
<td>
<a href="Download?fileName=@item.Value.DLoadFileName" target="_blank" class="btn btn-sm bg-success"><i class="fa-solid fa-download"></i></a>
</td>
}
else
{
<td class="text-danger">
<i class="fa-solid fa-circle-xmark"></i>
</td>
<td>
@if (item.Value.calcRunning)
{
<LoadingData DisplaySize="LoadingData.CtrlSize.Small" DisplayMode="LoadingData.SpinMode.BounceLine"></LoadingData>
}
else
{
<a class="btn btn-sm text-decoration-none" disabled><i class="fa-solid fa-download text-secondary"></i></a>
}
</td>
@if (!hasBit)
{
<td>
@*<i class="@showDanger(item.Value)"></i>*@
<button class="btn btn-sm btn-info" @onclick="()=>doProc(item.Value)"><i class="fa-solid fa-code-compare"></i></button>
</td>
}
@if (item.Value.errorMsgs.Count > 0)
{
<td>
<button class="btn btn-sm btn-danger" data-bs-toggle="modal" data-bs-target="#exampleModal" @onclick="()=>setCurrMsg(item.Value)"><i class="fa-solid fa-circle-exclamation"></i></button>
</td>
}
else
{ }
}
</tr>
@if (FileLines != null && FileLines.statesOK.Count > 0 && FileLines.eventsOK.Count > 0 && FileLines.lines.Count > 0 && item.Value.tempFileName == FileLines.file)
{
<div class="d-flex justify-content-between p-3">
<div class="card shadow-lg rounded mb-2">
<div class="card-header">
<h4>STATI</h4>
</div>
<div class="card-body overflow-auto" style="max-height: 50rem">
@foreach (var line in FileLines.lines)
{
<td class="text-danger">
<i class="fa-solid fa-circle-xmark"></i>
</td>
<td>
@if (item.Value.calcRunning)
{
@if (line.StartsWith("$STATE"))
{
<span class="@lineCssState(line.Split(":")[2].ToUpper().Trim())">@line</span>
<br />
}
<LoadingData DisplaySize="LoadingData.CtrlSize.Small" DisplayMode="LoadingData.SpinMode.BounceLine"></LoadingData>
}
</div>
</div>
<div class="card shadow-lg rounded mb-2">
<div class="card-header">
<h4>EVENTI</h4>
</div>
<div class="card-body overflow-auto" style="max-height: 50rem">
@foreach (var line in FileLines.lines)
else
{
@if (line.StartsWith("$EVENT"))
<a class="btn btn-sm text-decoration-none" disabled><i class="fa-solid fa-download text-secondary"></i></a>
}
</td>
@if (!hasBit)
{
<td>
@*<i class="@showDanger(item.Value)"></i>*@
<button class="btn btn-sm btn-info" @onclick="()=>doProc(item.Value)"><i class="fa-solid fa-code-compare"></i></button>
</td>
}
@if (item.Value.errorMsgs.Count > 0)
{
<td>
<button class="btn btn-sm btn-danger" data-bs-toggle="modal" data-bs-target="#exampleModal" @onclick="()=>setCurrMsg(item.Value)"><i class="fa-solid fa-circle-exclamation"></i></button>
</td>
}
else
{ }
}
</tr>
@if (FileLines != null && FileLines.statesOK.Count > 0 && FileLines.eventsOK.Count > 0 && FileLines.lines.Count > 0 && item.Value.tempFileName == FileLines.file)
{
<div class="d-flex justify-content-between p-3">
<div class="card shadow-lg rounded mb-2">
<div class="card-header">
<h4>STATI</h4>
</div>
<div class="card-body overflow-auto" style="max-height: 50rem">
@foreach (var line in FileLines.lines)
{
<div>
<span class="@lineCssEvent(line.Split(":")[2].ToUpper().Trim())">@line</span>
@if (line.StartsWith("$STATE"))
{
<span class="@lineCssState(line.Split(":")[2].ToUpper().Trim())">@line</span>
<br />
</div>
}
}
}
</div>
</div>
<div class="card shadow-lg rounded mb-2">
<div class="card-header">
<h4>EVENTI</h4>
</div>
<div class="card-body overflow-auto" style="max-height: 50rem">
@foreach (var line in FileLines.lines)
{
@if (line.StartsWith("$EVENT"))
{
<div>
<span class="@lineCssEvent(line.Split(":")[2].ToUpper().Trim())">@line</span>
<br />
</div>
}
}
</div>
</div>
</div>
</div>
}
}
}
</tbody>
@@ -117,9 +126,9 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
@if(currMsgs != null)
@if (currMsgs != null)
{
foreach(var msg in currMsgs.Distinct())
foreach (var msg in currMsgs.Distinct())
{
<div class="mb-1">
<span>• &nbsp; @msg</span>
+16 -4
View File
@@ -9,6 +9,9 @@ namespace SMGen.Components
{
protected FileLinesClass FileLines = new FileLinesClass();
[Parameter]
public bool doProcState { get; set; } = true;
[Parameter]
public bool calcEmptyState { get; set; } = false;
@@ -118,7 +121,16 @@ namespace SMGen.Components
await Task.Delay(1);
if (FileLines.statesOK.Count <= 0 && FileLines.eventsOK.Count <= 0 && FileLines.lines.Count <= 0)
{
FileLines = await SMGDService.DoCheckUnusedEvSt(currFile);
FileLines = await SMGDService.DoCheckUnusedEvSt(currFile);
#if false
if (doProcState)
{
}
else
{
FileLines = await SMGDService.DoCheckUnusedEv(currFile);
}
#endif
}
else
{
@@ -141,15 +153,15 @@ namespace SMGen.Components
// chiamo esecuzione 1:1...
if (hasBit)
{
await SMGDService.EvalIn2EvRuleFile(item.Value, true);
await SMGDService.EvalIn2EvRuleFile(item.Value, true, doProcState);
}
else if (is2Chk)
{
await SMGDService.modFile(item.Value, true);
await SMGDService.modFile(item.Value, true, doProcState);
}
else
{
await SMGDService.EvalIn2StateRuleFile(item.Value, false, calcItSelf, calcEmptyState, orderType);
await SMGDService.EvalIn2StateRuleFile(item.Value, false, calcItSelf, calcEmptyState, orderType, doProcState);
}
item.Value.calcRunning = false;
if (item.Value.isOk)
+16
View File
@@ -0,0 +1,16 @@
@page "/FileFixIngr"
<div class="text-center">
<span class="fs-1"><i class="fa-solid fa-wave-square"></i> Fix <b>Ingressi</b> *.rul files</span>
</div>
<div class="w-100 shadow-lg p-3 rounded mb-2">
<div class="d-flex justify-content-between w-100">
<div class="mb-2">
<InputFile OnChange="@LoadFiles" multiple />
</div>
</div>
<FilesList PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount" currFilter="@currFilter" hasBit="false" is2Chk="true" succFiles="@resetSucc" doProcState="false"></FilesList>
</div>
+196
View File
@@ -0,0 +1,196 @@
using EgwCoreLib.Razor;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components;
using NLog;
using SMGen.Data.Data;
using SMGen.Data.Services;
using SMGen.Data;
namespace SMGen.Pages
{
public partial class FileFixIngr
{
#region Protected Fields
protected static Logger Log = LogManager.GetCurrentClassLogger();
protected SelectSMIn2EvParams currFilter = new SelectSMIn2EvParams();
protected Dictionary<int, string> eventsFromDb = new Dictionary<int, string>();
protected DataPager? pagerRulFix = null!;
protected Dictionary<int, string> statesFromDb = new Dictionary<int, string>();
#endregion Protected Fields
#region Protected Properties
protected Dictionary<string, FilesClass> Files { get; set; } = new Dictionary<string, FilesClass>();
protected int maxAllowedFiles { get; set; } = 100;
protected string pathDir { get; set; } = "";
protected string pathFile { get; set; } = "";
protected int resetSucc { get; set; } = 0;
[Inject]
protected SMGDataService SMGDService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected void ForceReload(int newNum)
{
numRecord = newNum;
}
protected void ForceReloadPage(int newNum)
{
currPage = newNum;
}
protected override async Task OnInitializedAsync()
{
// path cartella root (development)
pathDir = Path.Combine("Temp", "unsafe_uploads");
// se la cartella non esistesse la creo
if (!Directory.Exists(pathDir))
{
Directory.CreateDirectory(pathDir);
Log.Info($"Creato directory {pathDir}");
}
// svuoto cartella prima di partire
deleteOldFiles(pathDir);
await Task.Delay(1);
await SMGDService.ExecFlushRedisPattern(Core.Constants.FILES_TO_PROC);
}
protected async Task pgResetReq(bool doReset)
{
if (doReset)
{
await Task.Delay(1);
if (pagerRulFix != null)
{
pagerRulFix.resetCurrPage();
}
}
}
protected async Task ReloadData()
{
Files = await SMGDService.FilesGetAll();
}
protected void UpdateTotCount(int newTotCount)
{
totalCount = newTotCount;
}
#endregion Protected Methods
#region Private Properties
private int currPage
{
get => currFilter.CurrPage;
set => currFilter.CurrPage = value;
}
private int numRecord
{
get => currFilter.NumRec;
set => currFilter.NumRec = value;
}
private int totalCount
{
get => currFilter.TotCount;
set => currFilter.TotCount = value;
}
#endregion Private Properties
#region Private Methods
/// <summary>
/// Procedee a bonificare la cartella di upload dei files + vecchi di 3 mesi
/// </summary>
private void deleteOldFiles(string dirPath)
{
// elenco files nella directory
string[] files = Directory.GetFiles(dirPath);
// li guardo tutti e se vecchi li elimino...
foreach (string file in files)
{
FileInfo fi = new FileInfo(file);
if (fi.LastAccessTime < DateTime.Now.AddMinutes(-10))
{
fi.Delete();
}
}
}
private async Task LoadFiles(InputFileChangeEventArgs e)
{
List<IBrowserFile> loadedFiles = new();
long maxFileSize = 1024 * 1024;
loadedFiles.Clear();
Files.Clear();
// svuoto cartella prima di partire
deleteOldFiles(pathDir);
foreach (var file in e.GetMultipleFiles(maxAllowedFiles))
{
try
{
loadedFiles.Add(file);
//assegno un nome file randomico x sicurezza
var trustedFileNameForFileStorage = Path.GetRandomFileName();
//path del file da scrivere
pathFile = Path.Combine(pathDir, trustedFileNameForFileStorage);
// creo file
using (FileStream fs = new(pathFile, FileMode.Create))
{
// copio il contenuto del file
await file.OpenReadStream(maxFileSize).CopyToAsync(fs);
// scrivo log
Log.Info($"Salvato file temp {pathFile}");
}
if (file.Name.Contains(".rul"))
{
var newFIle = new FilesClass()
{
tempFileName = pathFile,
isOk = false,
origFileName = file.Name,
calcRunning = false,
DLoadFileName = ""
};
Files.Add(file.Name, newFIle);
}
}
catch (Exception exc)
{
Log.Error($"Errore durante salvataggio file temp {file.Name}: {exc}{Environment.NewLine}");
}
}
if (Files != null && Files.Count > 0)
{
await SMGDService.FilesLoadRedis(Files);
}
resetSucc = 0;
await InvokeAsync(() => StateHasChanged());
await ReloadData();
}
#endregion Private Methods
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
@page "/FilesFix"
<div class="text-center">
<span class="fs-1 fw-bold">Files Fix</span>
<span class="fs-1"><i class="fa-solid fa-bullseye"></i> Fix <b>Stati</b> *.rul files</span>
</div>
+7
View File
@@ -0,0 +1,7 @@
@page "/ForceReset"
<h3>Force Reset All Data...</h3>
@if (isResetting)
{
<LoadingData DisplaySize="LoadingData.CtrlSize.Large" DisplayMode="LoadingData.SpinMode.Growl"></LoadingData>
}
+32
View File
@@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Components;
using SMGen.Data.Services;
using StackExchange.Redis;
namespace SMGen.Pages
{
public partial class ForceReset
{
[Inject]
protected SMGDataService SMGDService { get; set; } = null!;
[Inject]
protected NavigationManager NavMan { get; set; } = null!;
//protected override Task OnParametersSetAsync()
//{
// return base.OnParametersSetAsync();
//}
protected override async Task OnInitializedAsync()
{
isResetting = true;
RedisValue currKey = new RedisValue($"{Core.Constants.redisBaseAddr}:*");
await SMGDService.ExecFlushRedisPattern(currKey);
await Task.Delay(500);
isResetting = false;
NavMan.NavigateTo("", true);
}
private bool isResetting = false;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
@page "/SMEvent2State"
<div class="text-center">
<span class="fs-1 fw-bold">Stati</span>
<span class="fs-1"><i class="fa-solid fa-bullseye"></i> <b>Stati</b> rul &rarr; csv</span>
</div>
+2 -2
View File
@@ -1,7 +1,7 @@
@page "/SMIn2Event"
<div class="text-center">
<span class="fs-1 fw-bold">Ingressi</span>
<span class="fs-1"><i class="fa-solid fa-wave-square"></i> <b>Ingressi</b> rul &rarr; csv</span>
</div>
<div class="w-100 shadow-lg p-3 rounded mb-2">
@@ -11,7 +11,7 @@
<InputFile OnChange="@LoadFiles" multiple />
</div>
</div>
<FilesList PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount" currFilter="@currFilter" hasBit="true" succFiles="@resetSucc"></FilesList>
<FilesList PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount" currFilter="@currFilter" hasBit="true" succFiles="@resetSucc" doProcState="false"></FilesList>
</div>
<div class="w-100 shadow-lg p-3 bg-body rounded mb-2">
+4
View File
@@ -33,6 +33,10 @@ builder.Services.AddSingleton<SMGDataService>();
builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
var app = builder.Build();
// aggiunt base URL x routing corretto
var pathBase = configuration.GetValue<string>("ServerConf:BaseUrl") ?? (configuration.GetValue<string>("OptConf:BaseUrl") ?? "");
app.UsePathBase(pathBase);
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2023-07-24T14:24:14.2770302Z;True|2023-07-24T16:23:20.6455643+02:00;True|2023-05-22T15:35:59.9735292+02:00;False|2023-05-22T15:33:39.4808724+02:00;True|2023-05-11T17:36:48.1468628+02:00;</History>
<History>True|2024-09-18T06:56:03.0373948Z||;True|2024-09-17T19:25:38.1089716+02:00||;True|2024-09-17T17:30:03.3866876+02:00||;True|2023-07-24T16:24:14.2770302+02:00||;True|2023-07-24T16:23:20.6455643+02:00||;True|2023-05-22T15:35:59.9735292+02:00||;False|2023-05-22T15:33:39.4808724+02:00||;True|2023-05-11T17:36:48.1468628+02:00||;</History>
<LastFailureDetails />
<TimeStampOfAssociatedLegacyPublishXmlFile />
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAHBJL+AjnSkKKQcJBrmvYDwAAAAACAAAAAAADZgAAwAAAABAAAABqHjtCI4r9HP4to5TPRtU/AAAAAASAAACgAAAAEAAAAGWTrj6ykvtUZnIZTp5COsMYAAAAHkol9Zhdo3QCFNYyIvyJViyIyNSW1oNCFAAAAEvXT2wDdsDBGFpVXvR5NVA172tk</EncryptedPassword>
+5 -3
View File
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Description>State Machine Generator</Description>
<Version>0.8.2307.2416</Version>
<Version>0.9.2409.1809</Version>
</PropertyGroup>
<ItemGroup>
@@ -67,5 +67,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
</Target>
</Project>
+16 -6
View File
@@ -16,27 +16,37 @@
</div>
<div class="nav-item px-3">
<NavLink class="nav-link p-2" href="FamIngressi">
<span class="oi oi-list-rich" aria-hidden="true"></span> Anag Fam.Ingressi
<span class="fa-solid fa-table-list pe-2" aria-hidden="true"></span> Anag Fam.Ingressi
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link p-2" href="FamMacchine">
<span class="oi oi-list-rich" aria-hidden="true"></span> Anag Fam.Macchine
<span class="fa-solid fa-table-list pe-2" aria-hidden="true"></span> Anag Fam.Macchine
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link p-2" href="SMIn2Event">
<span class="oi oi-plus" aria-hidden="true"></span> Gen. SM Ingressi
<span class="fa-solid fa-wave-square pe-2" aria-hidden="true"></span> Gen. SM Ingressi
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link p-2" href="SMEvent2State">
<span class="oi oi-plus" aria-hidden="true"></span> Gen. SM Stati
<span class="fa-solid fa-bullseye pe-2" aria-hidden="true"></span> Gen. SM Stati
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link p-2" href="FilesFIx">
<span class="oi oi-file" aria-hidden="true"></span> Fix files
<NavLink class="nav-link text-warning p-2" href="FileFixIngr">
<span class="fa-solid fa-wave-square pe-2" aria-hidden="true"></span> Fix Ingressi.rul
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link text-warning p-2" href="FilesFix">
<span class="fa-solid fa-bullseye pe-2" aria-hidden="true"></span> Fix Stati.rul
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link p-2" href="ForceReset">
<span class="oi oi-reload" aria-hidden="true"></span> Reset All
</NavLink>
</div>
</nav>
+1
View File
@@ -10,6 +10,7 @@
"SMGen.DB": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=SMGen.UI;"
},
"ServerConf": {
"BaseUrl": "/MP/SMGen",
"ProcCsvRootPath": "Temp\\Rules\\PROCESSED",
"BitCsvPath": "BIT",
"StatiCsvPath": "STATI",
+69 -69
View File
@@ -1,93 +1,93 @@
#
#
# Colcom Macchine CABER (singola + prototipi)
#
# partenza da state machine attuale...
#
# 2024.09.18 check del file RUL con dati sul DB di DEV e ricreato csv e sistemati Eventi
#
#
$DEFINITIONS
$NAME : CABER
$IDX : 2
$N_STATES : 7
$N_BITS : 5
$NAME : CABER
$IDX : 2
$N_STATES : 7
$N_BITS : 5
#definizione bit : obbligatorio iniziare da 0
$BIT : 0 : bPowerOn
$BIT : 1 : bRun
$BIT : 2 : bDepPezzo
$BIT : 3 : bAlarm
$BIT : 4 : bManual
$BIT : 0 : bPowerOn
$BIT : 1 : bRun
$BIT : 2 : bDepPezzo
$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_Cycle_end
$STATE : 5 : ST_Alarm
$STATE : 6 : ST_Manual
$STATE : 0 : ST_Init
$STATE : 1 : ST_Power_off
$STATE : 2 : ST_Machine_ready
$STATE : 3 : ST_Run
$STATE : 4 : ST_Cycle_end
$STATE : 5 : ST_Alarm
$STATE : 6 : ST_Manual
#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
$EVENT : 00 : EMPTY
$EVENT : 01 : Barcode_Lavora
$EVENT : 02 : Barcode_Attrezzaggio
$EVENT : 03 : Barcode_Creazione_Programmi
$EVENT : 04 : Barcode_Lavori_Vari
$EVENT : 05 : Barcode_Guasto
$EVENT : 06 : Barcode_Manca_Pezzo
$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_Power_On
$EVENT : 16 : HW_Machining
$EVENT : 17 : HW_End_Machining
$EVENT : 18 : HW_Error
$EVENT : 19 : Barcode_Fermo_Organizzativo
$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_Materia_Prima
$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_Robot
$EVENT : 35 : HW_Start_Tavola
$EVENT : 36 : HW_End_Tavola
$EVENT : 37 : Barcode_Riempimento_Vasca
$EVENT : 38 : Barcode_Riscaldamento
$EVENT : 39 : Barcode_Anomalia_macchina
$EVENT : 40 : HW_Ciclo_Accensione_Spegnimento
$EVENT : 41 : HW_Machining_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
ST_Run : bManual : ST_Cycle_end : HW_end_pallet
ALL_STATES : bManual : ST_Manual : HW_manuale
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
#--------------------------------------------------------------------------
@@ -1,94 +0,0 @@
#
# Colcom Macchine CABER (singola + prototipi)
#
# partenza da state machine attuale...
#
#
$DEFINITIONS
$NAME : CABER
$IDX : 2
$N_STATES : 7
$N_BITS : 5
#definizione bit : obbligatorio iniziare da 0
$BIT : 0 : bPowerOn
$BIT : 1 : bRun
$BIT : 2 : bDepPezzo
$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_Cycle_end
$STATE : 5 : ST_Alarm
$STATE : 6 : ST_Manual
#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
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
#--------------------------------------------------------------------------
$DO
@@ -28,6 +28,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;0;58;58
1;0;59;59
1;0;60;60
1;0;61;61
1;0;62;62
1;0;63;63
1;2;0;0
1;2;1;13
1;2;3;3
@@ -57,6 +60,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;2;58;58
1;2;59;59
1;2;60;60
1;2;61;61
1;2;62;62
1;2;63;63
1;3;0;0
1;3;1;13
1;3;2;2
@@ -86,6 +92,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;3;58;58
1;3;59;59
1;3;60;60
1;3;61;61
1;3;62;62
1;3;63;63
1;4;0;0
1;4;1;13
1;4;2;2
@@ -115,6 +124,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;4;58;58
1;4;59;59
1;4;60;60
1;4;61;61
1;4;62;62
1;4;63;63
1;5;0;0
1;5;1;13
1;5;2;2
@@ -144,6 +156,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;5;58;58
1;5;59;59
1;5;60;60
1;5;61;61
1;5;62;62
1;5;63;63
1;6;0;0
1;6;1;13
1;6;2;2
@@ -173,6 +188,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;6;58;58
1;6;59;59
1;6;60;60
1;6;61;61
1;6;62;62
1;6;63;63
1;7;0;0
1;7;1;13
1;7;2;2
@@ -202,6 +220,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;7;58;58
1;7;59;59
1;7;60;60
1;7;61;61
1;7;62;62
1;7;63;63
1;8;0;0
1;8;1;13
1;8;2;2
@@ -231,6 +252,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;8;58;58
1;8;59;59
1;8;60;60
1;8;61;61
1;8;62;62
1;8;63;63
1;9;0;0
1;9;1;13
1;9;2;2
@@ -260,6 +284,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;9;58;58
1;9;59;59
1;9;60;60
1;9;61;61
1;9;62;62
1;9;63;63
1;10;0;0
1;10;1;13
1;10;2;2
@@ -289,6 +316,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;10;58;58
1;10;59;59
1;10;60;60
1;10;61;61
1;10;62;62
1;10;63;63
1;11;0;0
1;11;1;13
1;11;2;2
@@ -318,6 +348,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;11;58;58
1;11;59;59
1;11;60;60
1;11;61;61
1;11;62;62
1;11;63;63
1;13;0;0
1;13;2;2
1;13;3;3
@@ -347,6 +380,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;13;58;58
1;13;59;59
1;13;60;60
1;13;61;61
1;13;62;62
1;13;63;63
1;27;0;0
1;27;1;13
1;27;2;2
@@ -376,6 +412,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;27;58;58
1;27;59;59
1;27;60;60
1;27;61;61
1;27;62;62
1;27;63;63
1;30;0;0
1;30;1;13
1;30;2;2
@@ -405,6 +444,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;30;58;58
1;30;59;59
1;30;60;60
1;30;61;61
1;30;62;62
1;30;63;63
1;31;0;0
1;31;1;13
1;31;2;2
@@ -434,6 +476,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;31;58;58
1;31;59;59
1;31;60;60
1;31;61;61
1;31;62;62
1;31;63;63
1;32;0;0
1;32;1;13
1;32;2;2
@@ -463,6 +508,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;32;58;58
1;32;59;59
1;32;60;60
1;32;61;61
1;32;62;62
1;32;63;63
1;33;0;0
1;33;1;13
1;33;2;2
@@ -492,6 +540,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;33;58;58
1;33;59;59
1;33;60;60
1;33;61;61
1;33;62;62
1;33;63;63
1;34;0;0
1;34;1;13
1;34;2;2
@@ -521,6 +572,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;34;58;58
1;34;59;59
1;34;60;60
1;34;61;61
1;34;62;62
1;34;63;63
1;35;0;0
1;35;1;13
1;35;2;2
@@ -550,6 +604,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;35;58;58
1;35;59;59
1;35;60;60
1;35;61;61
1;35;62;62
1;35;63;63
1;49;0;0
1;49;1;13
1;49;2;2
@@ -579,6 +636,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;49;58;58
1;49;59;59
1;49;60;60
1;49;61;61
1;49;62;62
1;49;63;63
1;50;0;0
1;50;1;13
1;50;2;2
@@ -608,6 +668,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;50;58;58
1;50;59;59
1;50;60;60
1;50;61;61
1;50;62;62
1;50;63;63
1;51;0;0
1;51;1;13
1;51;2;2
@@ -637,6 +700,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;51;58;58
1;51;59;59
1;51;60;60
1;51;61;61
1;51;62;62
1;51;63;63
1;52;0;0
1;52;1;13
1;52;2;2
@@ -666,6 +732,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;52;58;58
1;52;59;59
1;52;60;60
1;52;61;61
1;52;62;62
1;52;63;63
1;54;0;0
1;54;1;13
1;54;2;2
@@ -695,6 +764,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;54;58;58
1;54;59;59
1;54;60;60
1;54;61;61
1;54;62;62
1;54;63;63
1;55;0;0
1;55;1;13
1;55;2;2
@@ -724,6 +796,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;55;58;58
1;55;59;59
1;55;60;60
1;55;61;61
1;55;62;62
1;55;63;63
1;56;0;0
1;56;1;13
1;56;2;2
@@ -753,6 +828,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;56;58;58
1;56;59;59
1;56;60;60
1;56;61;61
1;56;62;62
1;56;63;63
1;57;0;0
1;57;1;13
1;57;2;2
@@ -782,6 +860,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;57;58;58
1;57;59;59
1;57;60;60
1;57;61;61
1;57;62;62
1;57;63;63
1;58;0;0
1;58;1;13
1;58;2;2
@@ -811,6 +892,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;58;57;57
1;58;59;59
1;58;60;60
1;58;61;61
1;58;62;62
1;58;63;63
1;59;0;0
1;59;1;13
1;59;2;2
@@ -840,6 +924,9 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;59;57;57
1;59;58;58
1;59;60;60
1;59;61;61
1;59;62;62
1;59;63;63
1;60;0;0
1;60;1;13
1;60;2;2
@@ -869,3 +956,102 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
1;60;57;57
1;60;58;58
1;60;59;59
1;60;61;61
1;60;62;62
1;60;63;63
1;61;0;0
1;61;1;13
1;61;2;2
1;61;3;3
1;61;4;4
1;61;5;5
1;61;6;6
1;61;7;7
1;61;8;8
1;61;9;9
1;61;10;10
1;61;12;11
1;61;19;30
1;61;26;27
1;61;31;31
1;61;32;32
1;61;37;33
1;61;38;34
1;61;39;35
1;61;49;49
1;61;50;50
1;61;51;51
1;61;52;52
1;61;54;54
1;61;55;55
1;61;56;56
1;61;57;57
1;61;58;58
1;61;59;59
1;61;60;60
1;61;62;62
1;61;63;63
1;62;0;0
1;62;1;13
1;62;2;2
1;62;3;3
1;62;4;4
1;62;5;5
1;62;6;6
1;62;7;7
1;62;8;8
1;62;9;9
1;62;10;10
1;62;12;11
1;62;19;30
1;62;26;27
1;62;31;31
1;62;32;32
1;62;37;33
1;62;38;34
1;62;39;35
1;62;49;49
1;62;50;50
1;62;51;51
1;62;52;52
1;62;54;54
1;62;55;55
1;62;56;56
1;62;57;57
1;62;58;58
1;62;59;59
1;62;60;60
1;62;61;61
1;62;63;63
1;63;0;0
1;63;1;13
1;63;2;2
1;63;3;3
1;63;4;4
1;63;5;5
1;63;6;6
1;63;7;7
1;63;8;8
1;63;9;9
1;63;10;10
1;63;12;11
1;63;19;30
1;63;26;27
1;63;31;31
1;63;32;32
1;63;37;33
1;63;38;34
1;63;39;35
1;63;49;49
1;63;50;50
1;63;51;51
1;63;52;52
1;63;54;54
1;63;55;55
1;63;56;56
1;63;57;57
1;63;58;58
1;63;59;59
1;63;60;60
1;63;61;61
1;63;62;62
1 IdxFamiglia IdxStato IdxTipo next_IdxStato
28 1 0 58 58
29 1 0 59 59
30 1 0 60 60
31 1 0 61 61
32 1 0 62 62
33 1 0 63 63
34 1 2 0 0
35 1 2 1 13
36 1 2 3 3
60 1 2 58 58
61 1 2 59 59
62 1 2 60 60
63 1 2 61 61
64 1 2 62 62
65 1 2 63 63
66 1 3 0 0
67 1 3 1 13
68 1 3 2 2
92 1 3 58 58
93 1 3 59 59
94 1 3 60 60
95 1 3 61 61
96 1 3 62 62
97 1 3 63 63
98 1 4 0 0
99 1 4 1 13
100 1 4 2 2
124 1 4 58 58
125 1 4 59 59
126 1 4 60 60
127 1 4 61 61
128 1 4 62 62
129 1 4 63 63
130 1 5 0 0
131 1 5 1 13
132 1 5 2 2
156 1 5 58 58
157 1 5 59 59
158 1 5 60 60
159 1 5 61 61
160 1 5 62 62
161 1 5 63 63
162 1 6 0 0
163 1 6 1 13
164 1 6 2 2
188 1 6 58 58
189 1 6 59 59
190 1 6 60 60
191 1 6 61 61
192 1 6 62 62
193 1 6 63 63
194 1 7 0 0
195 1 7 1 13
196 1 7 2 2
220 1 7 58 58
221 1 7 59 59
222 1 7 60 60
223 1 7 61 61
224 1 7 62 62
225 1 7 63 63
226 1 8 0 0
227 1 8 1 13
228 1 8 2 2
252 1 8 58 58
253 1 8 59 59
254 1 8 60 60
255 1 8 61 61
256 1 8 62 62
257 1 8 63 63
258 1 9 0 0
259 1 9 1 13
260 1 9 2 2
284 1 9 58 58
285 1 9 59 59
286 1 9 60 60
287 1 9 61 61
288 1 9 62 62
289 1 9 63 63
290 1 10 0 0
291 1 10 1 13
292 1 10 2 2
316 1 10 58 58
317 1 10 59 59
318 1 10 60 60
319 1 10 61 61
320 1 10 62 62
321 1 10 63 63
322 1 11 0 0
323 1 11 1 13
324 1 11 2 2
348 1 11 58 58
349 1 11 59 59
350 1 11 60 60
351 1 11 61 61
352 1 11 62 62
353 1 11 63 63
354 1 13 0 0
355 1 13 2 2
356 1 13 3 3
380 1 13 58 58
381 1 13 59 59
382 1 13 60 60
383 1 13 61 61
384 1 13 62 62
385 1 13 63 63
386 1 27 0 0
387 1 27 1 13
388 1 27 2 2
412 1 27 58 58
413 1 27 59 59
414 1 27 60 60
415 1 27 61 61
416 1 27 62 62
417 1 27 63 63
418 1 30 0 0
419 1 30 1 13
420 1 30 2 2
444 1 30 58 58
445 1 30 59 59
446 1 30 60 60
447 1 30 61 61
448 1 30 62 62
449 1 30 63 63
450 1 31 0 0
451 1 31 1 13
452 1 31 2 2
476 1 31 58 58
477 1 31 59 59
478 1 31 60 60
479 1 31 61 61
480 1 31 62 62
481 1 31 63 63
482 1 32 0 0
483 1 32 1 13
484 1 32 2 2
508 1 32 58 58
509 1 32 59 59
510 1 32 60 60
511 1 32 61 61
512 1 32 62 62
513 1 32 63 63
514 1 33 0 0
515 1 33 1 13
516 1 33 2 2
540 1 33 58 58
541 1 33 59 59
542 1 33 60 60
543 1 33 61 61
544 1 33 62 62
545 1 33 63 63
546 1 34 0 0
547 1 34 1 13
548 1 34 2 2
572 1 34 58 58
573 1 34 59 59
574 1 34 60 60
575 1 34 61 61
576 1 34 62 62
577 1 34 63 63
578 1 35 0 0
579 1 35 1 13
580 1 35 2 2
604 1 35 58 58
605 1 35 59 59
606 1 35 60 60
607 1 35 61 61
608 1 35 62 62
609 1 35 63 63
610 1 49 0 0
611 1 49 1 13
612 1 49 2 2
636 1 49 58 58
637 1 49 59 59
638 1 49 60 60
639 1 49 61 61
640 1 49 62 62
641 1 49 63 63
642 1 50 0 0
643 1 50 1 13
644 1 50 2 2
668 1 50 58 58
669 1 50 59 59
670 1 50 60 60
671 1 50 61 61
672 1 50 62 62
673 1 50 63 63
674 1 51 0 0
675 1 51 1 13
676 1 51 2 2
700 1 51 58 58
701 1 51 59 59
702 1 51 60 60
703 1 51 61 61
704 1 51 62 62
705 1 51 63 63
706 1 52 0 0
707 1 52 1 13
708 1 52 2 2
732 1 52 58 58
733 1 52 59 59
734 1 52 60 60
735 1 52 61 61
736 1 52 62 62
737 1 52 63 63
738 1 54 0 0
739 1 54 1 13
740 1 54 2 2
764 1 54 58 58
765 1 54 59 59
766 1 54 60 60
767 1 54 61 61
768 1 54 62 62
769 1 54 63 63
770 1 55 0 0
771 1 55 1 13
772 1 55 2 2
796 1 55 58 58
797 1 55 59 59
798 1 55 60 60
799 1 55 61 61
800 1 55 62 62
801 1 55 63 63
802 1 56 0 0
803 1 56 1 13
804 1 56 2 2
828 1 56 58 58
829 1 56 59 59
830 1 56 60 60
831 1 56 61 61
832 1 56 62 62
833 1 56 63 63
834 1 57 0 0
835 1 57 1 13
836 1 57 2 2
860 1 57 58 58
861 1 57 59 59
862 1 57 60 60
863 1 57 61 61
864 1 57 62 62
865 1 57 63 63
866 1 58 0 0
867 1 58 1 13
868 1 58 2 2
892 1 58 57 57
893 1 58 59 59
894 1 58 60 60
895 1 58 61 61
896 1 58 62 62
897 1 58 63 63
898 1 59 0 0
899 1 59 1 13
900 1 59 2 2
924 1 59 57 57
925 1 59 58 58
926 1 59 60 60
927 1 59 61 61
928 1 59 62 62
929 1 59 63 63
930 1 60 0 0
931 1 60 1 13
932 1 60 2 2
956 1 60 57 57
957 1 60 58 58
958 1 60 59 59
959 1 60 61 61
960 1 60 62 62
961 1 60 63 63
962 1 61 0 0
963 1 61 1 13
964 1 61 2 2
965 1 61 3 3
966 1 61 4 4
967 1 61 5 5
968 1 61 6 6
969 1 61 7 7
970 1 61 8 8
971 1 61 9 9
972 1 61 10 10
973 1 61 12 11
974 1 61 19 30
975 1 61 26 27
976 1 61 31 31
977 1 61 32 32
978 1 61 37 33
979 1 61 38 34
980 1 61 39 35
981 1 61 49 49
982 1 61 50 50
983 1 61 51 51
984 1 61 52 52
985 1 61 54 54
986 1 61 55 55
987 1 61 56 56
988 1 61 57 57
989 1 61 58 58
990 1 61 59 59
991 1 61 60 60
992 1 61 62 62
993 1 61 63 63
994 1 62 0 0
995 1 62 1 13
996 1 62 2 2
997 1 62 3 3
998 1 62 4 4
999 1 62 5 5
1000 1 62 6 6
1001 1 62 7 7
1002 1 62 8 8
1003 1 62 9 9
1004 1 62 10 10
1005 1 62 12 11
1006 1 62 19 30
1007 1 62 26 27
1008 1 62 31 31
1009 1 62 32 32
1010 1 62 37 33
1011 1 62 38 34
1012 1 62 39 35
1013 1 62 49 49
1014 1 62 50 50
1015 1 62 51 51
1016 1 62 52 52
1017 1 62 54 54
1018 1 62 55 55
1019 1 62 56 56
1020 1 62 57 57
1021 1 62 58 58
1022 1 62 59 59
1023 1 62 60 60
1024 1 62 61 61
1025 1 62 63 63
1026 1 63 0 0
1027 1 63 1 13
1028 1 63 2 2
1029 1 63 3 3
1030 1 63 4 4
1031 1 63 5 5
1032 1 63 6 6
1033 1 63 7 7
1034 1 63 8 8
1035 1 63 9 9
1036 1 63 10 10
1037 1 63 12 11
1038 1 63 19 30
1039 1 63 26 27
1040 1 63 31 31
1041 1 63 32 32
1042 1 63 37 33
1043 1 63 38 34
1044 1 63 39 35
1045 1 63 49 49
1046 1 63 50 50
1047 1 63 51 51
1048 1 63 52 52
1049 1 63 54 54
1050 1 63 55 55
1051 1 63 56 56
1052 1 63 57 57
1053 1 63 58 58
1054 1 63 59 59
1055 1 63 60 60
1056 1 63 61 61
1057 1 63 62 62
+106 -96
View File
@@ -1,4 +1,4 @@
#
#
# Macchine MANUALE/Barcode di partenza
#
#
@@ -8,118 +8,128 @@
# 2023.10.13 Aggiunti Eventi Barcode 52 -> 58
# 2024.01.18 Aggiunto barcode Rottura Utensile - 59 - ColCom
# 2024.02.23 Aggiunto barcode Pausa - 60 - Fluitek
#
# 2024.07.17 Aggiunti Barcode Lvf - 61 62 63
$DEFINITIONS
$NAME : BARCODE_MANUAL
$IDX : 1
$NAME : BARCODE_MANUAL
$IDX : 1
# definizione stati (MACRO) : obbligatorio iniziare da 0 --> select * from AnagraficaStati
#
# 27 MancaRifornMPD -> Manca_Materia_Prima
#
$STATE : 0 : ND
$STATE : 2 : Attrezzaggio
$STATE : 3 : Creazione_Programmi
$STATE : 4 : Lavori_Vari
$STATE : 5 : Guasto
$STATE : 6 : Manca_Pezzo
$STATE : 7 : Manca_Lavoro
$STATE : 8 : Assenteismo
$STATE : 9 : Manutenzione
$STATE : 10 : Pulizia
$STATE : 11 : Macchina_Spenta
$STATE : 13 : Lavorazione
$STATE : 27 : Manca_Materia_Prima
$STATE : 30 : Fermo_Organizzativo
$STATE : 31 : Modifica_Programmi
$STATE : 32 : Sostituzione_Utensile
$STATE : 33 : Riempimento_Vasca
$STATE : 34 : Riscaldamento
$STATE : 35 : Anomalia_Macchina
$STATE : 49 : Manca_Attrezzatura
$STATE : 50 : Usura_Utensile
$STATE : 51 : Adeguamento_Attrezzature
$STATE : 52 : Formazione_Personale
$STATE : 54 : Attesa_Attrezzista
$STATE : 55 : Pausa_Pranzo
$STATE : 56 : Manca_Operatore
$STATE : 57 : Manca_Mater_Tagliato
$STATE : 58 : In_Deroga
$STATE : 59 : Rottura_Utensile
$STATE : 60 : Pausa
$STATE : 0 : ND
$STATE : 2 : Attrezzaggio
$STATE : 3 : Creazione_Programmi
$STATE : 4 : Lavori_Vari
$STATE : 5 : Guasto
$STATE : 6 : Manca_Pezzo
$STATE : 7 : Manca_Lavoro
$STATE : 8 : Assenteismo
$STATE : 9 : Manutenzione
$STATE : 10 : Pulizia
$STATE : 11 : Macchina_Spenta
$STATE : 13 : Lavorazione
$STATE : 27 : Manca_Materia_Prima
$STATE : 30 : Fermo_Organizzativo
$STATE : 31 : Modifica_Programmi
$STATE : 32 : Sostituzione_Utensile
$STATE : 33 : Riempimento_Vasca
$STATE : 34 : Riscaldamento
$STATE : 35 : Anomalia_Macchina
$STATE : 49 : Manca_Attrezzatura
$STATE : 50 : Usura_Utensile
$STATE : 51 : Adeguamento_Attrezzature
$STATE : 52 : Formazione_Personale
$STATE : 54 : Attesa_Attrezzista
$STATE : 55 : Pausa_Pranzo
$STATE : 56 : Manca_Operatore
$STATE : 57 : Manca_Mater_Tagliato
$STATE : 58 : In_Deroga
$STATE : 59 : Rottura_Utensile
$STATE : 60 : Pausa
$STATE : 61 : Manutenzione_Straordinaria
$STATE : 62 : Manutenzione_Ordinaria
$STATE : 63 : Problemi_di_Lavorazione
# definizione eventi : obbligatorio iniziare da 0 --> select * from AnagraficaEventi
# NOTE
#
$EVENT : 00 : EMPTY
$EVENT : 01 : Barcode_Lavora
$EVENT : 02 : Barcode_Attrezzaggio
$EVENT : 03 : Barcode_Creazione_Programmi
$EVENT : 04 : Barcode_Lavori_Vari
$EVENT : 05 : Barcode_Guasto
$EVENT : 06 : Barcode_Manca_Pezzo
$EVENT : 07 : Barcode_Manca_Ciclo_Lavoro
$EVENT : 08 : Barcode_Assenteismo
$EVENT : 09 : Barcode_Manutenzione
$EVENT : 10 : Barcode_Pulizia
$EVENT : 12 : Barcode_Macchina_Spenta
$EVENT : 19 : Barcode_Fermo_Organizzativo
$EVENT : 26 : Barcode_Manca_Materia_Prima
$EVENT : 31 : Barcode_Modifica_Programmi
$EVENT : 32 : Barcode_Sostituzione_Utensile
$EVENT : 37 : Barcode_Riempimento_Vasca
$EVENT : 38 : Barcode_Riscaldamento
$EVENT : 39 : Barcode_Anomalia_macchina
$EVENT : 49 : Barcode_Manca_Attrezzatura
$EVENT : 50 : Barcode_Usura_Utensile
$EVENT : 51 : Barcode_Adeguamento_Attrezzature
$EVENT : 52 : Barcode_Formazione_Personale
$EVENT : 54 : Barcode_Attesa_Attrezzista
$EVENT : 55 : Barcode_Pausa_Pranzo
$EVENT : 56 : Barcode_Manca_Operatore
$EVENT : 57 : Barcode_Manca_Mater_Tagliato
$EVENT : 58 : Barcode_In_Deroga
$EVENT : 59 : Barcode_Rottura_Utensile
$EVENT : 60 : Barcode_Pausa
$EVENT : 00 : EMPTY
$EVENT : 01 : Barcode_Lavora
$EVENT : 02 : Barcode_Attrezzaggio
$EVENT : 03 : Barcode_Creazione_Programmi
$EVENT : 04 : Barcode_Lavori_Vari
$EVENT : 05 : Barcode_Guasto
$EVENT : 06 : Barcode_Manca_Pezzo
$EVENT : 07 : Barcode_Manca_Ciclo_Lavoro
$EVENT : 08 : Barcode_Assenteismo
$EVENT : 09 : Barcode_Manutenzione
$EVENT : 10 : Barcode_Pulizia
$EVENT : 12 : Barcode_Macchina_Spenta
$EVENT : 19 : Barcode_Fermo_Organizzativo
$EVENT : 26 : Barcode_Manca_Materia_Prima
$EVENT : 31 : Barcode_Modifica_Programmi
$EVENT : 32 : Barcode_Sostituzione_Utensile
$EVENT : 37 : Barcode_Riempimento_Vasca
$EVENT : 38 : Barcode_Riscaldamento
$EVENT : 39 : Barcode_Anomalia_macchina
$EVENT : 49 : Barcode_Manca_Attrezzatura
$EVENT : 50 : Barcode_Usura_Utensile
$EVENT : 51 : Barcode_Adeguamento_Attrezzature
$EVENT : 52 : Barcode_Formazione_Personale
$EVENT : 54 : Barcode_Attesa_Attrezzista
$EVENT : 55 : Barcode_Pausa_Pranzo
$EVENT : 56 : Barcode_Manca_Operatore
$EVENT : 57 : Barcode_Manca_Mater_Tagliato
$EVENT : 58 : Barcode_In_Deroga
$EVENT : 59 : Barcode_Rottura_Utensile
$EVENT : 60 : Barcode_Pausa
$EVENT : 61 : Barcode_Manutenzione_Straordinaria
$EVENT : 62 : Barcode_Manutenzione_Ordinaria
$EVENT : 63 : Barcode_Problemi_di_Lavorazione
$RULES
# state : event : next state
# state : event : next state
ALL_STATES : EMPTY : ND # 0
ALL_STATES : Barcode_Lavora : Lavorazione # 1
ALL_STATES : Barcode_Attrezzaggio : Attrezzaggio # 2
ALL_STATES : Barcode_Creazione_Programmi : Creazione_Programmi # 3
ALL_STATES : Barcode_Lavori_Vari : Lavori_Vari # 4
ALL_STATES : Barcode_Guasto : Guasto # 5
ALL_STATES : Barcode_Manca_Pezzo : Manca_Pezzo # 6
ALL_STATES : Barcode_Manca_Ciclo_Lavoro : Manca_Lavoro # 7
ALL_STATES : Barcode_Assenteismo : Assenteismo # 8
ALL_STATES : Barcode_Manutenzione : Manutenzione # 9
ALL_STATES : Barcode_Pulizia : Pulizia # 10
#ALL_STATES : Bcode_Cambio_Pallet : Cambio_Pezzo # 11 TOLTO perchè non dovrebbe mai essere usato da nessuno infatti nome sbagliato bcode
ALL_STATES : Barcode_Macchina_Spenta : Macchina_Spenta # 12
ALL_STATES : EMPTY : ND
ALL_STATES : Barcode_Lavora : Lavorazione
ALL_STATES : Barcode_Attrezzaggio : Attrezzaggio
ALL_STATES : Barcode_Creazione_Programmi : Creazione_Programmi
ALL_STATES : Barcode_Lavori_Vari : Lavori_Vari
ALL_STATES : Barcode_Guasto : Guasto
ALL_STATES : Barcode_Manca_Pezzo : Manca_Pezzo
ALL_STATES : Barcode_Manca_Ciclo_Lavoro : Manca_Lavoro
ALL_STATES : Barcode_Assenteismo : Assenteismo
ALL_STATES : Barcode_Manutenzione : Manutenzione
ALL_STATES : Barcode_Pulizia : Pulizia
ALL_STATES : Barcode_Macchina_Spenta : Macchina_Spenta
ALL_STATES : Barcode_Fermo_Organizzativo : Fermo_Organizzativo
ALL_STATES : Barcode_Manca_Materia_Prima : Manca_Materia_Prima # 26
ALL_STATES : Barcode_Modifica_Programmi : Modifica_Programmi
ALL_STATES : Barcode_Sostituzione_Utensile : Sostituzione_Utensile
ALL_STATES : Barcode_Riempimento_Vasca : Riempimento_Vasca
ALL_STATES : Barcode_Riscaldamento : Riscaldamento
ALL_STATES : Barcode_Anomalia_macchina : Anomalia_Macchina
ALL_STATES : Barcode_Manca_Attrezzatura : Manca_Attrezzatura # 49
ALL_STATES : Barcode_Usura_Utensile : Usura_Utensile # 50
ALL_STATES : Barcode_Adeguamento_Attrezzature : Adeguamento_Attrezzature # 51
ALL_STATES : Barcode_Formazione_Personale : Formazione_Personale # 52
ALL_STATES : Barcode_Attesa_Attrezzista : Attesa_Attrezzista # 54
ALL_STATES : Barcode_Pausa_Pranzo : Pausa_Pranzo # 55
ALL_STATES : Barcode_Manca_Operatore : Manca_Operatore # 56
ALL_STATES : Barcode_Manca_Mater_Tagliato : Manca_Mater_Tagliato # 57
ALL_STATES : Barcode_In_Deroga : In_Deroga # 58
ALL_STATES : Barcode_Rottura_Utensile : Rottura_Utensile # 59
ALL_STATES : Barcode_Pausa : Pausa # 60
ALL_STATES : Barcode_Fermo_Organizzativo : Fermo_Organizzativo # 19
ALL_STATES : Barcode_Manca_Materia_Prima : Manca_Materia_Prima # 26
ALL_STATES : Barcode_Modifica_Programmi : Modifica_Programmi # 31
ALL_STATES : Barcode_Sostituzione_Utensile : Sostituzione_Utensile # 32
ALL_STATES : Barcode_Riempimento_Vasca : Riempimento_Vasca # 37
ALL_STATES : Barcode_Riscaldamento : Riscaldamento # 38
ALL_STATES : Barcode_Anomalia_Macchina : Anomalia_Macchina # 39
ALL_STATES : Barcode_Manca_Attrezzatura : Manca_Attrezzatura # 49
ALL_STATES : Barcode_Usura_Utensile : Usura_Utensile # 50
ALL_STATES : Barcode_Adeguamento_Attrezzature : Adeguamento_Attrezzature # 51
ALL_STATES : Barcode_Formazione_Personale : Formazione_Personale # 52
ALL_STATES : Barcode_Attesa_Attrezzista : Attesa_Attrezzista # 54
ALL_STATES : Barcode_Pausa_Pranzo : Pausa_Pranzo # 55
ALL_STATES : Barcode_Manca_Operatore : Manca_Operatore # 56
ALL_STATES : Barcode_Manca_Mater_Tagliato : Manca_Mater_Tagliato # 57
ALL_STATES : Barcode_In_Deroga : In_Deroga # 58
ALL_STATES : Barcode_Rottura_Utensile : Rottura_Utensile # 59
ALL_STATES : Barcode_Pausa : Pausa # 60
ALL_STATES : Barcode_Manutenzione_Straordinaria : Manutenzione_Straordinaria # 61
ALL_STATES : Barcode_Manutenzione_Ordinaria : Manutenzione_Ordinaria # 62
ALL_STATES : Barcode_Problemi_di_Lavorazione : Problemi_di_Lavorazione # 63
#--------------------------------------------------------------------------
$DO
@@ -22,6 +22,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;0;50;50
11;0;51;51
11;0;52;52
11;0;54;54
11;0;55;55
11;0;56;56
11;0;57;57
11;0;58;58
11;0;59;59
11;0;60;60
11;0;61;61
11;0;62;62
11;0;63;63
11;1;0;0
11;1;2;2
11;1;3;3
@@ -61,6 +71,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;1;50;50
11;1;51;51
11;1;52;52
11;1;54;54
11;1;55;55
11;1;56;56
11;1;57;57
11;1;58;58
11;1;59;59
11;1;60;60
11;1;61;61
11;1;62;62
11;1;63;63
11;2;0;0
11;2;1;1
11;2;3;3
@@ -85,6 +105,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;2;50;50
11;2;51;51
11;2;52;52
11;2;54;54
11;2;55;55
11;2;56;56
11;2;57;57
11;2;58;58
11;2;59;59
11;2;60;60
11;2;61;61
11;2;62;62
11;2;63;63
11;3;0;0
11;3;1;1
11;3;2;2
@@ -109,6 +139,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;3;50;50
11;3;51;51
11;3;52;52
11;3;54;54
11;3;55;55
11;3;56;56
11;3;57;57
11;3;58;58
11;3;59;59
11;3;60;60
11;3;61;61
11;3;62;62
11;3;63;63
11;4;0;0
11;4;1;1
11;4;2;2
@@ -133,6 +173,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;4;50;50
11;4;51;51
11;4;52;52
11;4;54;54
11;4;55;55
11;4;56;56
11;4;57;57
11;4;58;58
11;4;59;59
11;4;60;60
11;4;61;61
11;4;62;62
11;4;63;63
11;5;0;0
11;5;1;1
11;5;2;2
@@ -157,6 +207,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;5;50;50
11;5;51;51
11;5;52;52
11;5;54;54
11;5;55;55
11;5;56;56
11;5;57;57
11;5;58;58
11;5;59;59
11;5;60;60
11;5;61;61
11;5;62;62
11;5;63;63
11;6;0;0
11;6;1;1
11;6;2;2
@@ -181,6 +241,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;6;50;50
11;6;51;51
11;6;52;52
11;6;54;54
11;6;55;55
11;6;56;56
11;6;57;57
11;6;58;58
11;6;59;59
11;6;60;60
11;6;61;61
11;6;62;62
11;6;63;63
11;7;0;0
11;7;1;1
11;7;2;2
@@ -205,6 +275,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;7;50;50
11;7;51;51
11;7;52;52
11;7;54;54
11;7;55;55
11;7;56;56
11;7;57;57
11;7;58;58
11;7;59;59
11;7;60;60
11;7;61;61
11;7;62;62
11;7;63;63
11;8;0;0
11;8;1;1
11;8;2;2
@@ -229,6 +309,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;8;50;50
11;8;51;51
11;8;52;52
11;8;54;54
11;8;55;55
11;8;56;56
11;8;57;57
11;8;58;58
11;8;59;59
11;8;60;60
11;8;61;61
11;8;62;62
11;8;63;63
11;9;0;0
11;9;1;1
11;9;2;2
@@ -253,6 +343,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;9;50;50
11;9;51;51
11;9;52;52
11;9;54;54
11;9;55;55
11;9;56;56
11;9;57;57
11;9;58;58
11;9;59;59
11;9;60;60
11;9;61;61
11;9;62;62
11;9;63;63
11;10;0;0
11;10;1;1
11;10;2;2
@@ -277,6 +377,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;10;50;50
11;10;51;51
11;10;52;52
11;10;54;54
11;10;55;55
11;10;56;56
11;10;57;57
11;10;58;58
11;10;59;59
11;10;60;60
11;10;61;61
11;10;62;62
11;10;63;63
11;11;0;0
11;11;1;1
11;11;2;2
@@ -314,6 +424,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;11;50;50
11;11;51;51
11;11;52;52
11;11;54;54
11;11;55;55
11;11;56;56
11;11;57;57
11;11;58;58
11;11;59;59
11;11;60;60
11;11;61;61
11;11;62;62
11;11;63;63
11;12;0;0
11;12;1;1
11;12;2;2
@@ -353,6 +473,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;12;50;50
11;12;51;51
11;12;52;52
11;12;54;54
11;12;55;55
11;12;56;56
11;12;57;57
11;12;58;58
11;12;59;59
11;12;60;60
11;12;61;61
11;12;62;62
11;12;63;63
11;13;0;0
11;13;1;1
11;13;2;2
@@ -391,6 +521,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;13;50;50
11;13;51;51
11;13;52;52
11;13;54;54
11;13;55;55
11;13;56;56
11;13;57;57
11;13;58;58
11;13;59;59
11;13;60;60
11;13;61;61
11;13;62;62
11;13;63;63
11;14;0;0
11;14;1;1
11;14;2;2
@@ -427,6 +567,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;14;50;50
11;14;51;51
11;14;52;52
11;14;54;54
11;14;55;55
11;14;56;56
11;14;57;57
11;14;58;58
11;14;59;59
11;14;60;60
11;14;61;61
11;14;62;62
11;14;63;63
11;15;0;0
11;15;1;1
11;15;2;2
@@ -465,6 +615,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;15;50;50
11;15;51;51
11;15;52;52
11;15;54;54
11;15;55;55
11;15;56;56
11;15;57;57
11;15;58;58
11;15;59;59
11;15;60;60
11;15;61;61
11;15;62;62
11;15;63;63
11;23;0;0
11;23;1;1
11;23;2;2
@@ -504,6 +664,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;23;50;50
11;23;51;51
11;23;52;52
11;23;54;54
11;23;55;55
11;23;56;56
11;23;57;57
11;23;58;58
11;23;59;59
11;23;60;60
11;23;61;61
11;23;62;62
11;23;63;63
11;24;0;0
11;24;1;1
11;24;2;2
@@ -543,6 +713,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;24;50;50
11;24;51;51
11;24;52;52
11;24;54;54
11;24;55;55
11;24;56;56
11;24;57;57
11;24;58;58
11;24;59;59
11;24;60;60
11;24;61;61
11;24;62;62
11;24;63;63
11;25;0;0
11;25;1;1
11;25;2;2
@@ -581,6 +761,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;25;50;50
11;25;51;51
11;25;52;52
11;25;54;54
11;25;55;55
11;25;56;56
11;25;57;57
11;25;58;58
11;25;59;59
11;25;60;60
11;25;61;61
11;25;62;62
11;25;63;63
11;26;0;0
11;26;1;1
11;26;2;2
@@ -620,6 +810,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;26;50;50
11;26;51;51
11;26;52;52
11;26;54;54
11;26;55;55
11;26;56;56
11;26;57;57
11;26;58;58
11;26;59;59
11;26;60;60
11;26;61;61
11;26;62;62
11;26;63;63
11;27;0;0
11;27;1;1
11;27;2;2
@@ -644,6 +844,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;27;50;50
11;27;51;51
11;27;52;52
11;27;54;54
11;27;55;55
11;27;56;56
11;27;57;57
11;27;58;58
11;27;59;59
11;27;60;60
11;27;61;61
11;27;62;62
11;27;63;63
11;28;0;0
11;28;1;1
11;28;2;2
@@ -669,6 +879,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;28;50;50
11;28;51;51
11;28;52;52
11;28;54;54
11;28;55;55
11;28;56;56
11;28;57;57
11;28;58;58
11;28;59;59
11;28;60;60
11;28;61;61
11;28;62;62
11;28;63;63
11;29;0;0
11;29;1;1
11;29;2;2
@@ -694,6 +914,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;29;50;50
11;29;51;51
11;29;52;52
11;29;54;54
11;29;55;55
11;29;56;56
11;29;57;57
11;29;58;58
11;29;59;59
11;29;60;60
11;29;61;61
11;29;62;62
11;29;63;63
11;30;0;0
11;30;1;1
11;30;2;2
@@ -717,6 +947,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;30;50;50
11;30;51;51
11;30;52;52
11;30;54;54
11;30;55;55
11;30;56;56
11;30;57;57
11;30;58;58
11;30;59;59
11;30;60;60
11;30;61;61
11;30;62;62
11;30;63;63
11;31;0;0
11;31;1;1
11;31;2;2
@@ -741,6 +981,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;31;50;50
11;31;51;51
11;31;52;52
11;31;54;54
11;31;55;55
11;31;56;56
11;31;57;57
11;31;58;58
11;31;59;59
11;31;60;60
11;31;61;61
11;31;62;62
11;31;63;63
11;32;0;0
11;32;1;1
11;32;2;2
@@ -765,6 +1015,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;32;50;50
11;32;51;51
11;32;52;52
11;32;54;54
11;32;55;55
11;32;56;56
11;32;57;57
11;32;58;58
11;32;59;59
11;32;60;60
11;32;61;61
11;32;62;62
11;32;63;63
11;33;0;0
11;33;1;1
11;33;2;2
@@ -789,6 +1049,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;33;50;50
11;33;51;51
11;33;52;52
11;33;54;54
11;33;55;55
11;33;56;56
11;33;57;57
11;33;58;58
11;33;59;59
11;33;60;60
11;33;61;61
11;33;62;62
11;33;63;63
11;34;0;0
11;34;1;1
11;34;2;2
@@ -815,6 +1085,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;34;50;50
11;34;51;51
11;34;52;52
11;34;54;54
11;34;55;55
11;34;56;56
11;34;57;57
11;34;58;58
11;34;59;59
11;34;60;60
11;34;61;61
11;34;62;62
11;34;63;63
11;35;0;0
11;35;1;1
11;35;2;2
@@ -839,6 +1119,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;35;50;50
11;35;51;51
11;35;52;52
11;35;54;54
11;35;55;55
11;35;56;56
11;35;57;57
11;35;58;58
11;35;59;59
11;35;60;60
11;35;61;61
11;35;62;62
11;35;63;63
11;49;0;0
11;49;1;1
11;49;2;2
@@ -863,6 +1153,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;49;50;50
11;49;51;51
11;49;52;52
11;49;54;54
11;49;55;55
11;49;56;56
11;49;57;57
11;49;58;58
11;49;59;59
11;49;60;60
11;49;61;61
11;49;62;62
11;49;63;63
11;50;0;0
11;50;1;1
11;50;2;2
@@ -886,6 +1186,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;50;49;49
11;50;51;51
11;50;52;52
11;50;54;54
11;50;55;55
11;50;56;56
11;50;57;57
11;50;58;58
11;50;59;59
11;50;60;60
11;50;61;61
11;50;62;62
11;50;63;63
11;51;0;0
11;51;1;1
11;51;2;2
@@ -909,6 +1219,16 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;51;49;49
11;51;50;50
11;51;52;52
11;51;54;54
11;51;55;55
11;51;56;56
11;51;57;57
11;51;58;58
11;51;59;59
11;51;60;60
11;51;61;61
11;51;62;62
11;51;63;63
11;52;0;0
11;52;1;1
11;52;2;2
@@ -932,3 +1252,343 @@ IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;52;49;49
11;52;50;50
11;52;51;51
11;52;54;54
11;52;55;55
11;52;56;56
11;52;57;57
11;52;58;58
11;52;59;59
11;52;60;60
11;52;61;61
11;52;62;62
11;52;63;63
11;54;0;0
11;54;1;1
11;54;2;2
11;54;3;3
11;54;4;4
11;54;5;5
11;54;6;6
11;54;7;7
11;54;8;8
11;54;9;9
11;54;10;10
11;54;12;11
11;54;14;11
11;54;19;30
11;54;26;27
11;54;31;31
11;54;32;32
11;54;37;33
11;54;38;34
11;54;39;35
11;54;49;49
11;54;50;50
11;54;51;51
11;54;52;52
11;54;55;55
11;54;56;56
11;54;57;57
11;54;58;58
11;54;59;59
11;54;60;60
11;54;61;61
11;54;62;62
11;54;63;63
11;55;0;0
11;55;1;1
11;55;2;2
11;55;3;3
11;55;4;4
11;55;5;5
11;55;6;6
11;55;7;7
11;55;8;8
11;55;9;9
11;55;10;10
11;55;12;11
11;55;14;11
11;55;19;30
11;55;26;27
11;55;31;31
11;55;32;32
11;55;37;33
11;55;38;34
11;55;39;35
11;55;49;49
11;55;50;50
11;55;51;51
11;55;52;52
11;55;54;54
11;55;56;56
11;55;57;57
11;55;58;58
11;55;59;59
11;55;60;60
11;55;61;61
11;55;62;62
11;55;63;63
11;56;0;0
11;56;1;1
11;56;2;2
11;56;3;3
11;56;4;4
11;56;5;5
11;56;6;6
11;56;7;7
11;56;8;8
11;56;9;9
11;56;10;10
11;56;12;11
11;56;14;11
11;56;19;30
11;56;26;27
11;56;31;31
11;56;32;32
11;56;37;33
11;56;38;34
11;56;39;35
11;56;49;49
11;56;50;50
11;56;51;51
11;56;52;52
11;56;54;54
11;56;55;55
11;56;57;57
11;56;58;58
11;56;59;59
11;56;60;60
11;56;61;61
11;56;62;62
11;56;63;63
11;57;0;0
11;57;1;1
11;57;2;2
11;57;3;3
11;57;4;4
11;57;5;5
11;57;6;6
11;57;7;7
11;57;8;8
11;57;9;9
11;57;10;10
11;57;12;11
11;57;14;11
11;57;19;30
11;57;26;27
11;57;31;31
11;57;32;32
11;57;37;33
11;57;38;34
11;57;39;35
11;57;49;49
11;57;50;50
11;57;51;51
11;57;52;52
11;57;54;54
11;57;55;55
11;57;56;56
11;57;58;58
11;57;59;59
11;57;60;60
11;57;61;61
11;57;62;62
11;57;63;63
11;58;0;0
11;58;1;1
11;58;2;2
11;58;3;3
11;58;4;4
11;58;5;5
11;58;6;6
11;58;7;7
11;58;8;8
11;58;9;9
11;58;10;10
11;58;12;11
11;58;14;11
11;58;19;30
11;58;26;27
11;58;31;31
11;58;32;32
11;58;37;33
11;58;38;34
11;58;39;35
11;58;49;49
11;58;50;50
11;58;51;51
11;58;52;52
11;58;54;54
11;58;55;55
11;58;56;56
11;58;57;57
11;58;59;59
11;58;60;60
11;58;61;61
11;58;62;62
11;58;63;63
11;59;0;0
11;59;1;1
11;59;2;2
11;59;3;3
11;59;4;4
11;59;5;5
11;59;6;6
11;59;7;7
11;59;8;8
11;59;9;9
11;59;10;10
11;59;12;11
11;59;14;11
11;59;19;30
11;59;26;27
11;59;31;31
11;59;32;32
11;59;37;33
11;59;38;34
11;59;39;35
11;59;49;49
11;59;50;50
11;59;51;51
11;59;52;52
11;59;54;54
11;59;55;55
11;59;56;56
11;59;57;57
11;59;58;58
11;59;60;60
11;59;61;61
11;59;62;62
11;59;63;63
11;60;0;0
11;60;1;1
11;60;2;2
11;60;3;3
11;60;4;4
11;60;5;5
11;60;6;6
11;60;7;7
11;60;8;8
11;60;9;9
11;60;10;10
11;60;12;11
11;60;14;11
11;60;19;30
11;60;26;27
11;60;31;31
11;60;32;32
11;60;37;33
11;60;38;34
11;60;39;35
11;60;49;49
11;60;50;50
11;60;51;51
11;60;52;52
11;60;54;54
11;60;55;55
11;60;56;56
11;60;57;57
11;60;58;58
11;60;59;59
11;60;61;61
11;60;62;62
11;60;63;63
11;61;0;0
11;61;1;1
11;61;2;2
11;61;3;3
11;61;4;4
11;61;5;5
11;61;6;6
11;61;7;7
11;61;8;8
11;61;9;9
11;61;10;10
11;61;12;11
11;61;14;11
11;61;19;30
11;61;26;27
11;61;31;31
11;61;32;32
11;61;37;33
11;61;38;34
11;61;39;35
11;61;49;49
11;61;50;50
11;61;51;51
11;61;52;52
11;61;54;54
11;61;55;55
11;61;56;56
11;61;57;57
11;61;58;58
11;61;59;59
11;61;60;60
11;61;62;62
11;61;63;63
11;62;0;0
11;62;1;1
11;62;2;2
11;62;3;3
11;62;4;4
11;62;5;5
11;62;6;6
11;62;7;7
11;62;8;8
11;62;9;9
11;62;10;10
11;62;12;11
11;62;14;11
11;62;19;30
11;62;26;27
11;62;31;31
11;62;32;32
11;62;37;33
11;62;38;34
11;62;39;35
11;62;49;49
11;62;50;50
11;62;51;51
11;62;52;52
11;62;54;54
11;62;55;55
11;62;56;56
11;62;57;57
11;62;58;58
11;62;59;59
11;62;60;60
11;62;61;61
11;62;63;63
11;63;0;0
11;63;1;1
11;63;2;2
11;63;3;3
11;63;4;4
11;63;5;5
11;63;6;6
11;63;7;7
11;63;8;8
11;63;9;9
11;63;10;10
11;63;12;11
11;63;14;11
11;63;19;30
11;63;26;27
11;63;31;31
11;63;32;32
11;63;37;33
11;63;38;34
11;63;39;35
11;63;49;49
11;63;50;50
11;63;51;51
11;63;52;52
11;63;54;54
11;63;55;55
11;63;56;56
11;63;57;57
11;63;58;58
11;63;59;59
11;63;60;60
11;63;61;61
11;63;62;62
1 IdxFamiglia IdxStato IdxTipo next_IdxStato
22 11 0 50 50
23 11 0 51 51
24 11 0 52 52
25 11 0 54 54
26 11 0 55 55
27 11 0 56 56
28 11 0 57 57
29 11 0 58 58
30 11 0 59 59
31 11 0 60 60
32 11 0 61 61
33 11 0 62 62
34 11 0 63 63
35 11 1 0 0
36 11 1 2 2
37 11 1 3 3
71 11 1 50 50
72 11 1 51 51
73 11 1 52 52
74 11 1 54 54
75 11 1 55 55
76 11 1 56 56
77 11 1 57 57
78 11 1 58 58
79 11 1 59 59
80 11 1 60 60
81 11 1 61 61
82 11 1 62 62
83 11 1 63 63
84 11 2 0 0
85 11 2 1 1
86 11 2 3 3
105 11 2 50 50
106 11 2 51 51
107 11 2 52 52
108 11 2 54 54
109 11 2 55 55
110 11 2 56 56
111 11 2 57 57
112 11 2 58 58
113 11 2 59 59
114 11 2 60 60
115 11 2 61 61
116 11 2 62 62
117 11 2 63 63
118 11 3 0 0
119 11 3 1 1
120 11 3 2 2
139 11 3 50 50
140 11 3 51 51
141 11 3 52 52
142 11 3 54 54
143 11 3 55 55
144 11 3 56 56
145 11 3 57 57
146 11 3 58 58
147 11 3 59 59
148 11 3 60 60
149 11 3 61 61
150 11 3 62 62
151 11 3 63 63
152 11 4 0 0
153 11 4 1 1
154 11 4 2 2
173 11 4 50 50
174 11 4 51 51
175 11 4 52 52
176 11 4 54 54
177 11 4 55 55
178 11 4 56 56
179 11 4 57 57
180 11 4 58 58
181 11 4 59 59
182 11 4 60 60
183 11 4 61 61
184 11 4 62 62
185 11 4 63 63
186 11 5 0 0
187 11 5 1 1
188 11 5 2 2
207 11 5 50 50
208 11 5 51 51
209 11 5 52 52
210 11 5 54 54
211 11 5 55 55
212 11 5 56 56
213 11 5 57 57
214 11 5 58 58
215 11 5 59 59
216 11 5 60 60
217 11 5 61 61
218 11 5 62 62
219 11 5 63 63
220 11 6 0 0
221 11 6 1 1
222 11 6 2 2
241 11 6 50 50
242 11 6 51 51
243 11 6 52 52
244 11 6 54 54
245 11 6 55 55
246 11 6 56 56
247 11 6 57 57
248 11 6 58 58
249 11 6 59 59
250 11 6 60 60
251 11 6 61 61
252 11 6 62 62
253 11 6 63 63
254 11 7 0 0
255 11 7 1 1
256 11 7 2 2
275 11 7 50 50
276 11 7 51 51
277 11 7 52 52
278 11 7 54 54
279 11 7 55 55
280 11 7 56 56
281 11 7 57 57
282 11 7 58 58
283 11 7 59 59
284 11 7 60 60
285 11 7 61 61
286 11 7 62 62
287 11 7 63 63
288 11 8 0 0
289 11 8 1 1
290 11 8 2 2
309 11 8 50 50
310 11 8 51 51
311 11 8 52 52
312 11 8 54 54
313 11 8 55 55
314 11 8 56 56
315 11 8 57 57
316 11 8 58 58
317 11 8 59 59
318 11 8 60 60
319 11 8 61 61
320 11 8 62 62
321 11 8 63 63
322 11 9 0 0
323 11 9 1 1
324 11 9 2 2
343 11 9 50 50
344 11 9 51 51
345 11 9 52 52
346 11 9 54 54
347 11 9 55 55
348 11 9 56 56
349 11 9 57 57
350 11 9 58 58
351 11 9 59 59
352 11 9 60 60
353 11 9 61 61
354 11 9 62 62
355 11 9 63 63
356 11 10 0 0
357 11 10 1 1
358 11 10 2 2
377 11 10 50 50
378 11 10 51 51
379 11 10 52 52
380 11 10 54 54
381 11 10 55 55
382 11 10 56 56
383 11 10 57 57
384 11 10 58 58
385 11 10 59 59
386 11 10 60 60
387 11 10 61 61
388 11 10 62 62
389 11 10 63 63
390 11 11 0 0
391 11 11 1 1
392 11 11 2 2
424 11 11 50 50
425 11 11 51 51
426 11 11 52 52
427 11 11 54 54
428 11 11 55 55
429 11 11 56 56
430 11 11 57 57
431 11 11 58 58
432 11 11 59 59
433 11 11 60 60
434 11 11 61 61
435 11 11 62 62
436 11 11 63 63
437 11 12 0 0
438 11 12 1 1
439 11 12 2 2
473 11 12 50 50
474 11 12 51 51
475 11 12 52 52
476 11 12 54 54
477 11 12 55 55
478 11 12 56 56
479 11 12 57 57
480 11 12 58 58
481 11 12 59 59
482 11 12 60 60
483 11 12 61 61
484 11 12 62 62
485 11 12 63 63
486 11 13 0 0
487 11 13 1 1
488 11 13 2 2
521 11 13 50 50
522 11 13 51 51
523 11 13 52 52
524 11 13 54 54
525 11 13 55 55
526 11 13 56 56
527 11 13 57 57
528 11 13 58 58
529 11 13 59 59
530 11 13 60 60
531 11 13 61 61
532 11 13 62 62
533 11 13 63 63
534 11 14 0 0
535 11 14 1 1
536 11 14 2 2
567 11 14 50 50
568 11 14 51 51
569 11 14 52 52
570 11 14 54 54
571 11 14 55 55
572 11 14 56 56
573 11 14 57 57
574 11 14 58 58
575 11 14 59 59
576 11 14 60 60
577 11 14 61 61
578 11 14 62 62
579 11 14 63 63
580 11 15 0 0
581 11 15 1 1
582 11 15 2 2
615 11 15 50 50
616 11 15 51 51
617 11 15 52 52
618 11 15 54 54
619 11 15 55 55
620 11 15 56 56
621 11 15 57 57
622 11 15 58 58
623 11 15 59 59
624 11 15 60 60
625 11 15 61 61
626 11 15 62 62
627 11 15 63 63
628 11 23 0 0
629 11 23 1 1
630 11 23 2 2
664 11 23 50 50
665 11 23 51 51
666 11 23 52 52
667 11 23 54 54
668 11 23 55 55
669 11 23 56 56
670 11 23 57 57
671 11 23 58 58
672 11 23 59 59
673 11 23 60 60
674 11 23 61 61
675 11 23 62 62
676 11 23 63 63
677 11 24 0 0
678 11 24 1 1
679 11 24 2 2
713 11 24 50 50
714 11 24 51 51
715 11 24 52 52
716 11 24 54 54
717 11 24 55 55
718 11 24 56 56
719 11 24 57 57
720 11 24 58 58
721 11 24 59 59
722 11 24 60 60
723 11 24 61 61
724 11 24 62 62
725 11 24 63 63
726 11 25 0 0
727 11 25 1 1
728 11 25 2 2
761 11 25 50 50
762 11 25 51 51
763 11 25 52 52
764 11 25 54 54
765 11 25 55 55
766 11 25 56 56
767 11 25 57 57
768 11 25 58 58
769 11 25 59 59
770 11 25 60 60
771 11 25 61 61
772 11 25 62 62
773 11 25 63 63
774 11 26 0 0
775 11 26 1 1
776 11 26 2 2
810 11 26 50 50
811 11 26 51 51
812 11 26 52 52
813 11 26 54 54
814 11 26 55 55
815 11 26 56 56
816 11 26 57 57
817 11 26 58 58
818 11 26 59 59
819 11 26 60 60
820 11 26 61 61
821 11 26 62 62
822 11 26 63 63
823 11 27 0 0
824 11 27 1 1
825 11 27 2 2
844 11 27 50 50
845 11 27 51 51
846 11 27 52 52
847 11 27 54 54
848 11 27 55 55
849 11 27 56 56
850 11 27 57 57
851 11 27 58 58
852 11 27 59 59
853 11 27 60 60
854 11 27 61 61
855 11 27 62 62
856 11 27 63 63
857 11 28 0 0
858 11 28 1 1
859 11 28 2 2
879 11 28 50 50
880 11 28 51 51
881 11 28 52 52
882 11 28 54 54
883 11 28 55 55
884 11 28 56 56
885 11 28 57 57
886 11 28 58 58
887 11 28 59 59
888 11 28 60 60
889 11 28 61 61
890 11 28 62 62
891 11 28 63 63
892 11 29 0 0
893 11 29 1 1
894 11 29 2 2
914 11 29 50 50
915 11 29 51 51
916 11 29 52 52
917 11 29 54 54
918 11 29 55 55
919 11 29 56 56
920 11 29 57 57
921 11 29 58 58
922 11 29 59 59
923 11 29 60 60
924 11 29 61 61
925 11 29 62 62
926 11 29 63 63
927 11 30 0 0
928 11 30 1 1
929 11 30 2 2
947 11 30 50 50
948 11 30 51 51
949 11 30 52 52
950 11 30 54 54
951 11 30 55 55
952 11 30 56 56
953 11 30 57 57
954 11 30 58 58
955 11 30 59 59
956 11 30 60 60
957 11 30 61 61
958 11 30 62 62
959 11 30 63 63
960 11 31 0 0
961 11 31 1 1
962 11 31 2 2
981 11 31 50 50
982 11 31 51 51
983 11 31 52 52
984 11 31 54 54
985 11 31 55 55
986 11 31 56 56
987 11 31 57 57
988 11 31 58 58
989 11 31 59 59
990 11 31 60 60
991 11 31 61 61
992 11 31 62 62
993 11 31 63 63
994 11 32 0 0
995 11 32 1 1
996 11 32 2 2
1015 11 32 50 50
1016 11 32 51 51
1017 11 32 52 52
1018 11 32 54 54
1019 11 32 55 55
1020 11 32 56 56
1021 11 32 57 57
1022 11 32 58 58
1023 11 32 59 59
1024 11 32 60 60
1025 11 32 61 61
1026 11 32 62 62
1027 11 32 63 63
1028 11 33 0 0
1029 11 33 1 1
1030 11 33 2 2
1049 11 33 50 50
1050 11 33 51 51
1051 11 33 52 52
1052 11 33 54 54
1053 11 33 55 55
1054 11 33 56 56
1055 11 33 57 57
1056 11 33 58 58
1057 11 33 59 59
1058 11 33 60 60
1059 11 33 61 61
1060 11 33 62 62
1061 11 33 63 63
1062 11 34 0 0
1063 11 34 1 1
1064 11 34 2 2
1085 11 34 50 50
1086 11 34 51 51
1087 11 34 52 52
1088 11 34 54 54
1089 11 34 55 55
1090 11 34 56 56
1091 11 34 57 57
1092 11 34 58 58
1093 11 34 59 59
1094 11 34 60 60
1095 11 34 61 61
1096 11 34 62 62
1097 11 34 63 63
1098 11 35 0 0
1099 11 35 1 1
1100 11 35 2 2
1119 11 35 50 50
1120 11 35 51 51
1121 11 35 52 52
1122 11 35 54 54
1123 11 35 55 55
1124 11 35 56 56
1125 11 35 57 57
1126 11 35 58 58
1127 11 35 59 59
1128 11 35 60 60
1129 11 35 61 61
1130 11 35 62 62
1131 11 35 63 63
1132 11 49 0 0
1133 11 49 1 1
1134 11 49 2 2
1153 11 49 50 50
1154 11 49 51 51
1155 11 49 52 52
1156 11 49 54 54
1157 11 49 55 55
1158 11 49 56 56
1159 11 49 57 57
1160 11 49 58 58
1161 11 49 59 59
1162 11 49 60 60
1163 11 49 61 61
1164 11 49 62 62
1165 11 49 63 63
1166 11 50 0 0
1167 11 50 1 1
1168 11 50 2 2
1186 11 50 49 49
1187 11 50 51 51
1188 11 50 52 52
1189 11 50 54 54
1190 11 50 55 55
1191 11 50 56 56
1192 11 50 57 57
1193 11 50 58 58
1194 11 50 59 59
1195 11 50 60 60
1196 11 50 61 61
1197 11 50 62 62
1198 11 50 63 63
1199 11 51 0 0
1200 11 51 1 1
1201 11 51 2 2
1219 11 51 49 49
1220 11 51 50 50
1221 11 51 52 52
1222 11 51 54 54
1223 11 51 55 55
1224 11 51 56 56
1225 11 51 57 57
1226 11 51 58 58
1227 11 51 59 59
1228 11 51 60 60
1229 11 51 61 61
1230 11 51 62 62
1231 11 51 63 63
1232 11 52 0 0
1233 11 52 1 1
1234 11 52 2 2
1252 11 52 49 49
1253 11 52 50 50
1254 11 52 51 51
1255 11 52 54 54
1256 11 52 55 55
1257 11 52 56 56
1258 11 52 57 57
1259 11 52 58 58
1260 11 52 59 59
1261 11 52 60 60
1262 11 52 61 61
1263 11 52 62 62
1264 11 52 63 63
1265 11 54 0 0
1266 11 54 1 1
1267 11 54 2 2
1268 11 54 3 3
1269 11 54 4 4
1270 11 54 5 5
1271 11 54 6 6
1272 11 54 7 7
1273 11 54 8 8
1274 11 54 9 9
1275 11 54 10 10
1276 11 54 12 11
1277 11 54 14 11
1278 11 54 19 30
1279 11 54 26 27
1280 11 54 31 31
1281 11 54 32 32
1282 11 54 37 33
1283 11 54 38 34
1284 11 54 39 35
1285 11 54 49 49
1286 11 54 50 50
1287 11 54 51 51
1288 11 54 52 52
1289 11 54 55 55
1290 11 54 56 56
1291 11 54 57 57
1292 11 54 58 58
1293 11 54 59 59
1294 11 54 60 60
1295 11 54 61 61
1296 11 54 62 62
1297 11 54 63 63
1298 11 55 0 0
1299 11 55 1 1
1300 11 55 2 2
1301 11 55 3 3
1302 11 55 4 4
1303 11 55 5 5
1304 11 55 6 6
1305 11 55 7 7
1306 11 55 8 8
1307 11 55 9 9
1308 11 55 10 10
1309 11 55 12 11
1310 11 55 14 11
1311 11 55 19 30
1312 11 55 26 27
1313 11 55 31 31
1314 11 55 32 32
1315 11 55 37 33
1316 11 55 38 34
1317 11 55 39 35
1318 11 55 49 49
1319 11 55 50 50
1320 11 55 51 51
1321 11 55 52 52
1322 11 55 54 54
1323 11 55 56 56
1324 11 55 57 57
1325 11 55 58 58
1326 11 55 59 59
1327 11 55 60 60
1328 11 55 61 61
1329 11 55 62 62
1330 11 55 63 63
1331 11 56 0 0
1332 11 56 1 1
1333 11 56 2 2
1334 11 56 3 3
1335 11 56 4 4
1336 11 56 5 5
1337 11 56 6 6
1338 11 56 7 7
1339 11 56 8 8
1340 11 56 9 9
1341 11 56 10 10
1342 11 56 12 11
1343 11 56 14 11
1344 11 56 19 30
1345 11 56 26 27
1346 11 56 31 31
1347 11 56 32 32
1348 11 56 37 33
1349 11 56 38 34
1350 11 56 39 35
1351 11 56 49 49
1352 11 56 50 50
1353 11 56 51 51
1354 11 56 52 52
1355 11 56 54 54
1356 11 56 55 55
1357 11 56 57 57
1358 11 56 58 58
1359 11 56 59 59
1360 11 56 60 60
1361 11 56 61 61
1362 11 56 62 62
1363 11 56 63 63
1364 11 57 0 0
1365 11 57 1 1
1366 11 57 2 2
1367 11 57 3 3
1368 11 57 4 4
1369 11 57 5 5
1370 11 57 6 6
1371 11 57 7 7
1372 11 57 8 8
1373 11 57 9 9
1374 11 57 10 10
1375 11 57 12 11
1376 11 57 14 11
1377 11 57 19 30
1378 11 57 26 27
1379 11 57 31 31
1380 11 57 32 32
1381 11 57 37 33
1382 11 57 38 34
1383 11 57 39 35
1384 11 57 49 49
1385 11 57 50 50
1386 11 57 51 51
1387 11 57 52 52
1388 11 57 54 54
1389 11 57 55 55
1390 11 57 56 56
1391 11 57 58 58
1392 11 57 59 59
1393 11 57 60 60
1394 11 57 61 61
1395 11 57 62 62
1396 11 57 63 63
1397 11 58 0 0
1398 11 58 1 1
1399 11 58 2 2
1400 11 58 3 3
1401 11 58 4 4
1402 11 58 5 5
1403 11 58 6 6
1404 11 58 7 7
1405 11 58 8 8
1406 11 58 9 9
1407 11 58 10 10
1408 11 58 12 11
1409 11 58 14 11
1410 11 58 19 30
1411 11 58 26 27
1412 11 58 31 31
1413 11 58 32 32
1414 11 58 37 33
1415 11 58 38 34
1416 11 58 39 35
1417 11 58 49 49
1418 11 58 50 50
1419 11 58 51 51
1420 11 58 52 52
1421 11 58 54 54
1422 11 58 55 55
1423 11 58 56 56
1424 11 58 57 57
1425 11 58 59 59
1426 11 58 60 60
1427 11 58 61 61
1428 11 58 62 62
1429 11 58 63 63
1430 11 59 0 0
1431 11 59 1 1
1432 11 59 2 2
1433 11 59 3 3
1434 11 59 4 4
1435 11 59 5 5
1436 11 59 6 6
1437 11 59 7 7
1438 11 59 8 8
1439 11 59 9 9
1440 11 59 10 10
1441 11 59 12 11
1442 11 59 14 11
1443 11 59 19 30
1444 11 59 26 27
1445 11 59 31 31
1446 11 59 32 32
1447 11 59 37 33
1448 11 59 38 34
1449 11 59 39 35
1450 11 59 49 49
1451 11 59 50 50
1452 11 59 51 51
1453 11 59 52 52
1454 11 59 54 54
1455 11 59 55 55
1456 11 59 56 56
1457 11 59 57 57
1458 11 59 58 58
1459 11 59 60 60
1460 11 59 61 61
1461 11 59 62 62
1462 11 59 63 63
1463 11 60 0 0
1464 11 60 1 1
1465 11 60 2 2
1466 11 60 3 3
1467 11 60 4 4
1468 11 60 5 5
1469 11 60 6 6
1470 11 60 7 7
1471 11 60 8 8
1472 11 60 9 9
1473 11 60 10 10
1474 11 60 12 11
1475 11 60 14 11
1476 11 60 19 30
1477 11 60 26 27
1478 11 60 31 31
1479 11 60 32 32
1480 11 60 37 33
1481 11 60 38 34
1482 11 60 39 35
1483 11 60 49 49
1484 11 60 50 50
1485 11 60 51 51
1486 11 60 52 52
1487 11 60 54 54
1488 11 60 55 55
1489 11 60 56 56
1490 11 60 57 57
1491 11 60 58 58
1492 11 60 59 59
1493 11 60 61 61
1494 11 60 62 62
1495 11 60 63 63
1496 11 61 0 0
1497 11 61 1 1
1498 11 61 2 2
1499 11 61 3 3
1500 11 61 4 4
1501 11 61 5 5
1502 11 61 6 6
1503 11 61 7 7
1504 11 61 8 8
1505 11 61 9 9
1506 11 61 10 10
1507 11 61 12 11
1508 11 61 14 11
1509 11 61 19 30
1510 11 61 26 27
1511 11 61 31 31
1512 11 61 32 32
1513 11 61 37 33
1514 11 61 38 34
1515 11 61 39 35
1516 11 61 49 49
1517 11 61 50 50
1518 11 61 51 51
1519 11 61 52 52
1520 11 61 54 54
1521 11 61 55 55
1522 11 61 56 56
1523 11 61 57 57
1524 11 61 58 58
1525 11 61 59 59
1526 11 61 60 60
1527 11 61 62 62
1528 11 61 63 63
1529 11 62 0 0
1530 11 62 1 1
1531 11 62 2 2
1532 11 62 3 3
1533 11 62 4 4
1534 11 62 5 5
1535 11 62 6 6
1536 11 62 7 7
1537 11 62 8 8
1538 11 62 9 9
1539 11 62 10 10
1540 11 62 12 11
1541 11 62 14 11
1542 11 62 19 30
1543 11 62 26 27
1544 11 62 31 31
1545 11 62 32 32
1546 11 62 37 33
1547 11 62 38 34
1548 11 62 39 35
1549 11 62 49 49
1550 11 62 50 50
1551 11 62 51 51
1552 11 62 52 52
1553 11 62 54 54
1554 11 62 55 55
1555 11 62 56 56
1556 11 62 57 57
1557 11 62 58 58
1558 11 62 59 59
1559 11 62 60 60
1560 11 62 61 61
1561 11 62 63 63
1562 11 63 0 0
1563 11 63 1 1
1564 11 63 2 2
1565 11 63 3 3
1566 11 63 4 4
1567 11 63 5 5
1568 11 63 6 6
1569 11 63 7 7
1570 11 63 8 8
1571 11 63 9 9
1572 11 63 10 10
1573 11 63 12 11
1574 11 63 14 11
1575 11 63 19 30
1576 11 63 26 27
1577 11 63 31 31
1578 11 63 32 32
1579 11 63 37 33
1580 11 63 38 34
1581 11 63 39 35
1582 11 63 49 49
1583 11 63 50 50
1584 11 63 51 51
1585 11 63 52 52
1586 11 63 54 54
1587 11 63 55 55
1588 11 63 56 56
1589 11 63 57 57
1590 11 63 58 58
1591 11 63 59 59
1592 11 63 60 60
1593 11 63 61 61
1594 11 63 62 62
@@ -1,10 +1,12 @@
#
#
# Famiglia Macchine : 11 - Donati - base
#
# **** ATTENZIONE!!! ***** Se si aggiunge un Evento o uno Stato va prima aggiunto nel FILE MASTER ELENCO_EVENTI_E_STATI_MASTER.rul se non presente
#
# 2023.09.26 Creata partendo da RUL vecchia su DB e aggiunti\spostati gli eventi 37,38 e relativi Stati (vanno poi fatte sistemazione lato DB)
# 2024.03.27 Sistemazione allineamento e Intestazione
# 2024.07.17 Aggiunta Barcode Nuovi
# 2024.07.18 Aggiunti Barcode Lvf - 61 62 63
#
#
$DEFINITIONS
@@ -50,6 +52,16 @@ $STATE : 49 : Manca_Attrezzatura
$STATE : 50 : Usura_Utensile
$STATE : 51 : Adeguamento_Attrezzature
$STATE : 52 : Formazione_Personale
$STATE : 54 : Attesa_Attrezzista
$STATE : 55 : Pausa_Pranzo
$STATE : 56 : Manca_Operatore
$STATE : 57 : Manca_Mater_Tagliato
$STATE : 58 : In_Deroga
$STATE : 59 : Rottura_Utensile
$STATE : 60 : Pausa
$STATE : 61 : Manutenzione_Straordinaria
$STATE : 62 : Manutenzione_Ordinaria
$STATE : 63 : Problemi_di_Lavorazione
#definizione eventi : obbligatorio iniziare da 0 --> select * from AnagraficaEventi
# NOTE
@@ -107,220 +119,242 @@ $EVENT : 49 : Barcode_Manca_Attrezzatura
$EVENT : 50 : Barcode_Usura_Utensile
$EVENT : 51 : Barcode_Adeguamento_Attrezzature
$EVENT : 52 : Barcode_Formazione_Personale
$EVENT : 54 : Barcode_Attesa_Attrezzista
$EVENT : 55 : Barcode_Pausa_Pranzo
$EVENT : 56 : Barcode_Manca_Operatore
$EVENT : 57 : Barcode_Manca_Mater_Tagliato
$EVENT : 58 : Barcode_In_Deroga
$EVENT : 59 : Barcode_Rottura_Utensile
$EVENT : 60 : Barcode_Pausa
$EVENT : 61 : Barcode_Manutenzione_Straordinaria
$EVENT : 62 : Barcode_Manutenzione_Ordinaria
$EVENT : 63 : Barcode_Problemi_di_Lavorazione
$RULES
# state : event : next state : Cod. Event
# state : event : next state # Cod. Event
ALL_STATES : EMPTY : ND
ALL_STATES : Barcode_Lavora : Macchina_Pronta # 1
ALL_STATES : Barcode_Attrezzaggio : Attrezzaggio # 2
ALL_STATES : Barcode_Creazione_Programmi : Creazione_Programmi # 3
ALL_STATES : Barcode_Lavori_Vari : Lavori_Vari # 4
ALL_STATES : Barcode_Guasto : Guasto # 5
ALL_STATES : Barcode_Manca_Pezzo : Manca_Pezzo # 6
ALL_STATES : Barcode_Manca_Ciclo_Lavoro : Manca_Lavoro # 7
ALL_STATES : Barcode_Assenteismo : Assenteismo # 8
ALL_STATES : Barcode_Manutenzione : Manutenzione # 9
ALL_STATES : Barcode_Pulizia : Pulizia # 10
#ALL_STATES : Bcode_Cambio_Pallet : Cambio_Pezzo # 11 TOLTO perchè non dovrebbe mai essere usato da nessuno infatti nome sbagliato bcode
ALL_STATES : Barcode_Macchina_Spenta : Macchina_Spenta # 12
ALL_STATES : EMPTY : ND # 0
ALL_STATES : Barcode_Lavora : Macchina_Pronta # 1
ALL_STATES : Barcode_Attrezzaggio : Attrezzaggio # 2
ALL_STATES : Barcode_Creazione_Programmi : Creazione_Programmi # 3
ALL_STATES : Barcode_Lavori_Vari : Lavori_Vari # 4
ALL_STATES : Barcode_Guasto : Guasto # 5
ALL_STATES : Barcode_Manca_Pezzo : Manca_Pezzo # 6
ALL_STATES : Barcode_Manca_Ciclo_Lavoro : Manca_Lavoro # 7
ALL_STATES : Barcode_Assenteismo : Assenteismo # 8
ALL_STATES : Barcode_Manutenzione : Manutenzione # 9
ALL_STATES : Barcode_Pulizia : Pulizia # 10
#ALL_STATES : Bcode_Cambio_Pallet : Cambio_Pezzo # 11 TOLTO perchè non dovrebbe mai essere usato da nessuno infatti nome sbagliato bcode
ALL_STATES : Barcode_Macchina_Spenta : Macchina_Spenta # 12
ALL_STATES : Barcode_Fermo_Organizzativo : Fermo_Organizzativo # 19
ALL_STATES : Barcode_Manca_Materia_Prima : Manca_Materia_Prima # 26
ALL_STATES : Barcode_Modifica_Programmi : Modifica_Programmi # 31
ALL_STATES : Barcode_Sostituzione_Utensile : Sostituzione_Utensile # 32
ALL_STATES : Barcode_Riempimento_Vasca : Riempimento_Vasca # 37
ALL_STATES : Barcode_Riscaldamento : Riscaldamento # 38
ALL_STATES : Barcode_Anomalia_Macchina : Anomalia_Macchina # 39
ALL_STATES : Barcode_Manca_Attrezzatura : Manca_Attrezzatura # 49
ALL_STATES : Barcode_Usura_Utensile : Usura_Utensile # 50
ALL_STATES : Barcode_Adeguamento_Attrezzature : Adeguamento_Attrezzature # 51
ALL_STATES : Barcode_Formazione_Personale : Formazione_Personale # 52
ALL_STATES : Barcode_Fermo_Organizzativo : Fermo_Organizzativo # 19
ALL_STATES : Barcode_Manca_Materia_Prima : Manca_Materia_Prima # 26
ALL_STATES : Barcode_Modifica_Programmi : Modifica_Programmi # 31
ALL_STATES : Barcode_Sostituzione_Utensile : Sostituzione_Utensile # 32
ALL_STATES : Barcode_Riempimento_Vasca : Riempimento_Vasca # 37
ALL_STATES : Barcode_Riscaldamento : Riscaldamento # 38
ALL_STATES : Barcode_Anomalia_Macchina : Anomalia_Macchina # 39
ALL_STATES : Barcode_Manca_Attrezzatura : Manca_Attrezzatura # 49
ALL_STATES : Barcode_Usura_Utensile : Usura_Utensile # 50
ALL_STATES : Barcode_Adeguamento_Attrezzature : Adeguamento_Attrezzature # 51
ALL_STATES : Barcode_Formazione_Personale : Formazione_Personale # 52
ALL_STATES : HW_power_off : Macchina_Spenta # 14
ALL_STATES : Barcode_Attesa_Attrezzista : Attesa_Attrezzista # 54
ALL_STATES : Barcode_Pausa_Pranzo : Pausa_Pranzo # 55
ALL_STATES : Barcode_Manca_Operatore : Manca_Operatore # 56
ALL_STATES : Barcode_Manca_Mater_Tagliato : Manca_Mater_Tagliato # 57
ALL_STATES : Barcode_In_Deroga : In_Deroga # 58
ALL_STATES : Barcode_Rottura_Utensile : Rottura_Utensile # 59
ALL_STATES : Barcode_Pausa : Pausa # 60
Macchina_Pronta : HW_Power_On : Fermo_Generico # 15
Macchina_Spenta : HW_Power_On : Fermo_Generico # 15
Lavorazione : HW_Power_On : Fermo_Generico # 15
Cambio_Pezzo : HW_Power_On : Fermo_Generico # 15
Allarme_CN : HW_Power_On : Fermo_Generico # 15
Rottura_Nastro : HW_Power_On : Fermo_Generico # 15
Manuale : HW_Power_On : Fermo_Generico # 15
Non_Disponibile : HW_Power_On : Fermo_Generico # 15
Riscaldamento : HW_Power_On : Fermo_Generico # 15
ALL_STATES : Barcode_Manutenzione_Straordinaria : Manutenzione_Straordinaria # 61
ALL_STATES : Barcode_Manutenzione_Ordinaria : Manutenzione_Ordinaria # 62
ALL_STATES : Barcode_Problemi_di_Lavorazione : Problemi_di_Lavorazione # 63
Macchina_Pronta : HW_Machining : Lavorazione # 16
Macchina_Spenta : HW_Machining : Lavorazione # 16
Fermo_Generico : HW_Machining : Lavorazione # 16
Cambio_Pezzo : HW_Machining : Lavorazione # 16
Allarme_CN : HW_Machining : Lavorazione # 16
Rottura_Nastro : HW_Machining : Lavorazione # 16
Manuale : HW_Machining : Lavorazione # 16
Scarico_Pieno : HW_Machining : Lavorazione # 16
Non_Disponibile : HW_Machining : Lavorazione # 16
Magazzino_Grezzi_Vuoto : HW_Machining : Lavorazione # 16
Emergenza : HW_Machining : Lavorazione # 16
Riscaldamento : HW_Machining : Lavorazione # 16
ALL_STATES : HW_power_off : Macchina_Spenta # 14
Macchina_Pronta : HW_End_Machining : Cambio_Pezzo # 17
Macchina_Spenta : HW_End_Machining : Cambio_Pezzo # 17
Fermo_Generico : HW_End_Machining : Cambio_Pezzo # 17
Lavorazione : HW_End_Machining : Cambio_Pezzo # 17
Allarme_CN : HW_End_Machining : Cambio_Pezzo # 17
Rottura_Nastro : HW_End_Machining : Cambio_Pezzo # 17
Manuale : HW_End_Machining : Cambio_Pezzo # 17
Scarico_Pieno : HW_End_Machining : Cambio_Pezzo # 17
Non_Disponibile : HW_End_Machining : Cambio_Pezzo # 17
Macchina_Pronta : HW_Power_On : Fermo_Generico # 15
Macchina_Spenta : HW_Power_On : Fermo_Generico # 15
Lavorazione : HW_Power_On : Fermo_Generico # 15
Cambio_Pezzo : HW_Power_On : Fermo_Generico # 15
Allarme_CN : HW_Power_On : Fermo_Generico # 15
Rottura_Nastro : HW_Power_On : Fermo_Generico # 15
Manuale : HW_Power_On : Fermo_Generico # 15
Non_Disponibile : HW_Power_On : Fermo_Generico # 15
Riscaldamento : HW_Power_On : Fermo_Generico # 15
Macchina_Pronta : HW_Error : Allarme_CN # 18
Macchina_Spenta : HW_Error : Allarme_CN # 18
Fermo_Generico : HW_Error : Allarme_CN # 18
Lavorazione : HW_Error : Allarme_CN # 18
Cambio_Pezzo : HW_Error : Allarme_CN # 18
Rottura_Nastro : HW_Error : Allarme_CN # 18
Manuale : HW_Error : Allarme_CN # 18
Scarico_Pieno : HW_Error : Allarme_CN # 18
Non_Disponibile : HW_Error : Allarme_CN # 18
Macchina_Pronta : HW_Machining : Lavorazione # 16
Macchina_Spenta : HW_Machining : Lavorazione # 16
Fermo_Generico : HW_Machining : Lavorazione # 16
Cambio_Pezzo : HW_Machining : Lavorazione # 16
Allarme_CN : HW_Machining : Lavorazione # 16
Rottura_Nastro : HW_Machining : Lavorazione # 16
Manuale : HW_Machining : Lavorazione # 16
Scarico_Pieno : HW_Machining : Lavorazione # 16
Non_Disponibile : HW_Machining : Lavorazione # 16
Magazzino_Grezzi_Vuoto : HW_Machining : Lavorazione # 16
Emergenza : HW_Machining : Lavorazione # 16
Riscaldamento : HW_Machining : Lavorazione # 16
Macchina_Pronta : Contapezzi : Cambio_Pezzo # 20
Macchina_Spenta : Contapezzi : Cambio_Pezzo # 20
Fermo_Generico : Contapezzi : Cambio_Pezzo # 20
Lavorazione : Contapezzi : Cambio_Pezzo # 20
Allarme_CN : Contapezzi : Cambio_Pezzo # 20
Rottura_Nastro : Contapezzi : Cambio_Pezzo # 20
Manuale : Contapezzi : Cambio_Pezzo # 20
Scarico_Pieno : Contapezzi : Cambio_Pezzo # 20
Non_Disponibile : Contapezzi : Cambio_Pezzo # 20
Macchina_Pronta : HW_End_Machining : Cambio_Pezzo # 17
Macchina_Spenta : HW_End_Machining : Cambio_Pezzo # 17
Fermo_Generico : HW_End_Machining : Cambio_Pezzo # 17
Lavorazione : HW_End_Machining : Cambio_Pezzo # 17
Allarme_CN : HW_End_Machining : Cambio_Pezzo # 17
Rottura_Nastro : HW_End_Machining : Cambio_Pezzo # 17
Manuale : HW_End_Machining : Cambio_Pezzo # 17
Scarico_Pieno : HW_End_Machining : Cambio_Pezzo # 17
Non_Disponibile : HW_End_Machining : Cambio_Pezzo # 17
Macchina_Pronta : HW_Start_Pallet : Lavorazione # 21
Macchina_Spenta : HW_Start_Pallet : Lavorazione # 21
Fermo_Generico : HW_Start_Pallet : Lavorazione # 21
Cambio_Pezzo : HW_Start_Pallet : Lavorazione # 21
Allarme_CN : HW_Start_Pallet : Lavorazione # 21
Rottura_Nastro : HW_Start_Pallet : Lavorazione # 21
Manuale : HW_Start_Pallet : Lavorazione # 21
Scarico_Pieno : HW_Start_Pallet : Lavorazione # 21
Non_Disponibile : HW_Start_Pallet : Lavorazione # 21
Macchina_Pronta : HW_Error : Allarme_CN # 18
Macchina_Spenta : HW_Error : Allarme_CN # 18
Fermo_Generico : HW_Error : Allarme_CN # 18
Lavorazione : HW_Error : Allarme_CN # 18
Cambio_Pezzo : HW_Error : Allarme_CN # 18
Rottura_Nastro : HW_Error : Allarme_CN # 18
Manuale : HW_Error : Allarme_CN # 18
Scarico_Pieno : HW_Error : Allarme_CN # 18
Non_Disponibile : HW_Error : Allarme_CN # 18
Macchina_Pronta : HW_End_Pallet : Cambio_Pezzo # 22
Macchina_Spenta : HW_End_Pallet : Cambio_Pezzo # 22
Fermo_Generico : HW_End_Pallet : Cambio_Pezzo # 22
Lavorazione : HW_End_Pallet : Cambio_Pezzo # 22
Allarme_CN : HW_End_Pallet : Cambio_Pezzo # 22
Rottura_Nastro : HW_End_Pallet : Cambio_Pezzo # 22
Manuale : HW_End_Pallet : Cambio_Pezzo # 22
Scarico_Pieno : HW_End_Pallet : Cambio_Pezzo # 22
Non_Disponibile : HW_End_Pallet : Cambio_Pezzo # 22
Macchina_Pronta : Contapezzi : Cambio_Pezzo # 20
Macchina_Spenta : Contapezzi : Cambio_Pezzo # 20
Fermo_Generico : Contapezzi : Cambio_Pezzo # 20
Lavorazione : Contapezzi : Cambio_Pezzo # 20
Allarme_CN : Contapezzi : Cambio_Pezzo # 20
Rottura_Nastro : Contapezzi : Cambio_Pezzo # 20
Manuale : Contapezzi : Cambio_Pezzo # 20
Scarico_Pieno : Contapezzi : Cambio_Pezzo # 20
Non_Disponibile : Contapezzi : Cambio_Pezzo # 20
Macchina_Pronta : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Macchina_Spenta : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Fermo_Generico : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Lavorazione : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Cambio_Pezzo : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Allarme_CN : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Manuale : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Scarico_Pieno : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Non_Disponibile : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Macchina_Pronta : HW_Start_Pallet : Lavorazione # 21
Macchina_Spenta : HW_Start_Pallet : Lavorazione # 21
Fermo_Generico : HW_Start_Pallet : Lavorazione # 21
Cambio_Pezzo : HW_Start_Pallet : Lavorazione # 21
Allarme_CN : HW_Start_Pallet : Lavorazione # 21
Rottura_Nastro : HW_Start_Pallet : Lavorazione # 21
Manuale : HW_Start_Pallet : Lavorazione # 21
Scarico_Pieno : HW_Start_Pallet : Lavorazione # 21
Non_Disponibile : HW_Start_Pallet : Lavorazione # 21
Macchina_Pronta : HW_Manuale : Manuale # 24
Macchina_Spenta : HW_Manuale : Manuale # 24
Fermo_Generico : HW_Manuale : Manuale # 24
Lavorazione : HW_Manuale : Manuale # 24
Cambio_Pezzo : HW_Manuale : Manuale # 24
Allarme_CN : HW_Manuale : Manuale # 24
Rottura_Nastro : HW_Manuale : Manuale # 24
Scarico_Pieno : HW_Manuale : Manuale # 24
Non_Disponibile : HW_Manuale : Manuale # 24
Macchina_Pronta : HW_End_Pallet : Cambio_Pezzo # 22
Macchina_Spenta : HW_End_Pallet : Cambio_Pezzo # 22
Fermo_Generico : HW_End_Pallet : Cambio_Pezzo # 22
Lavorazione : HW_End_Pallet : Cambio_Pezzo # 22
Allarme_CN : HW_End_Pallet : Cambio_Pezzo # 22
Rottura_Nastro : HW_End_Pallet : Cambio_Pezzo # 22
Manuale : HW_End_Pallet : Cambio_Pezzo # 22
Scarico_Pieno : HW_End_Pallet : Cambio_Pezzo # 22
Non_Disponibile : HW_End_Pallet : Cambio_Pezzo # 22
Macchina_Pronta : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Macchina_Spenta : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Fermo_Generico : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Lavorazione : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Cambio_Pezzo : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Allarme_CN : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Rottura_Nastro : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Manuale : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Non_Disponibile : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Macchina_Pronta : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Macchina_Spenta : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Fermo_Generico : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Lavorazione : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Cambio_Pezzo : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Allarme_CN : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Manuale : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Scarico_Pieno : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Non_Disponibile : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Lavorazione : Timer_Timeout_Tempo_Ciclo : Fermo_Generico # 27
Macchina_Pronta : HW_Manuale : Manuale # 24
Macchina_Spenta : HW_Manuale : Manuale # 24
Fermo_Generico : HW_Manuale : Manuale # 24
Lavorazione : HW_Manuale : Manuale # 24
Cambio_Pezzo : HW_Manuale : Manuale # 24
Allarme_CN : HW_Manuale : Manuale # 24
Rottura_Nastro : HW_Manuale : Manuale # 24
Scarico_Pieno : HW_Manuale : Manuale # 24
Non_Disponibile : HW_Manuale : Manuale # 24
Macchina_Pronta : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Attrezzaggio : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Creazione_Programmi : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Lavori_Vari : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Guasto : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Pezzo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Lavoro : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Assenteismo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manutenzione : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Pulizia : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Fermo_Generico : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Lavorazione : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Cambio_Pezzo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Allarme_CN : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Rottura_Nastro : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manuale : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Scarico_Pieno : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Materia_Prima : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Modifica_Programmi : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Sostituzione_Utensile : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Riempimento_Vasca : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Riscaldamento : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Anomalia_Macchina : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Attrezzatura : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Macchina_Pronta : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Macchina_Spenta : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Fermo_Generico : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Lavorazione : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Cambio_Pezzo : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Allarme_CN : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Rottura_Nastro : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Manuale : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Non_Disponibile : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Macchina_Pronta : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Macchina_Spenta : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Fermo_Generico : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Lavorazione : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Cambio_Pezzo : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Allarme_CN : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Rottura_Nastro : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Manuale : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Scarico_Pieno : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Non_Disponibile : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Lavorazione : Timer_Timeout_Tempo_Ciclo : Fermo_Generico # 27
Macchina_Pronta : HW_Emergenza : Emergenza # 30
Macchina_Spenta : HW_Emergenza : Emergenza # 30
Fermo_Generico : HW_Emergenza : Emergenza # 30
Lavorazione : HW_Emergenza : Emergenza # 30
Cambio_Pezzo : HW_Emergenza : Emergenza # 30
Allarme_CN : HW_Emergenza : Emergenza # 30
Rottura_Nastro : HW_Emergenza : Emergenza # 30
Manuale : HW_Emergenza : Emergenza # 30
Scarico_Pieno : HW_Emergenza : Emergenza # 30
Non_Disponibile : HW_Emergenza : Emergenza # 30
Macchina_Pronta : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Attrezzaggio : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Creazione_Programmi : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Lavori_Vari : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Guasto : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Pezzo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Lavoro : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Assenteismo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manutenzione : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Pulizia : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Fermo_Generico : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Lavorazione : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Cambio_Pezzo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Allarme_CN : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Rottura_Nastro : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manuale : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Scarico_Pieno : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Materia_Prima : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Modifica_Programmi : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Sostituzione_Utensile : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Riempimento_Vasca : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Riscaldamento : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Anomalia_Macchina : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Attrezzatura : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Macchina_Pronta : HW_Allarme_Macchina : Allarme_CN # 33
Macchina_Spenta : HW_Allarme_Macchina : Allarme_CN # 33
Fermo_Generico : HW_Allarme_Macchina : Allarme_CN # 33
Lavorazione : HW_Allarme_Macchina : Allarme_CN # 33
Cambio_Pezzo : HW_Allarme_Macchina : Allarme_CN # 33
Rottura_Nastro : HW_Allarme_Macchina : Allarme_CN # 33
Manuale : HW_Allarme_Macchina : Allarme_CN # 33
Scarico_Pieno : HW_Allarme_Macchina : Allarme_CN # 33
Non_Disponibile : HW_Allarme_Macchina : Allarme_CN # 33
Macchina_Pronta : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Macchina_Spenta : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Fermo_Generico : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Lavorazione : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Cambio_Pezzo : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Allarme_CN : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Rottura_Nastro : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Manuale : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Scarico_Pieno : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Non_Disponibile : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Macchina_Pronta : HW_Start_Tavola : Lavorazione # 35
Macchina_Spenta : HW_Start_Tavola : Lavorazione # 35
Fermo_Generico : HW_Start_Tavola : Lavorazione # 35
Cambio_Pezzo : HW_Start_Tavola : Lavorazione # 35
Allarme_CN : HW_Start_Tavola : Lavorazione # 35
Rottura_Nastro : HW_Start_Tavola : Lavorazione # 35
Manuale : HW_Start_Tavola : Lavorazione # 35
Scarico_Pieno : HW_Start_Tavola : Lavorazione # 35
Non_Disponibile : HW_Start_Tavola : Lavorazione # 35
Macchina_Pronta : HW_Emergenza : Emergenza # 30
Macchina_Spenta : HW_Emergenza : Emergenza # 30
Fermo_Generico : HW_Emergenza : Emergenza # 30
Lavorazione : HW_Emergenza : Emergenza # 30
Cambio_Pezzo : HW_Emergenza : Emergenza # 30
Allarme_CN : HW_Emergenza : Emergenza # 30
Rottura_Nastro : HW_Emergenza : Emergenza # 30
Manuale : HW_Emergenza : Emergenza # 30
Scarico_Pieno : HW_Emergenza : Emergenza # 30
Non_Disponibile : HW_Emergenza : Emergenza # 30
Macchina_Pronta : HW_End_Tavola : Cambio_Pezzo # 36
Macchina_Spenta : HW_End_Tavola : Cambio_Pezzo # 36
Fermo_Generico : HW_End_Tavola : Cambio_Pezzo # 36
Lavorazione : HW_End_Tavola : Cambio_Pezzo # 36
Allarme_CN : HW_End_Tavola : Cambio_Pezzo # 36
Rottura_Nastro : HW_End_Tavola : Cambio_Pezzo # 36
Manuale : HW_End_Tavola : Cambio_Pezzo # 36
Scarico_Pieno : HW_End_Tavola : Cambio_Pezzo # 36
Non_Disponibile : HW_End_Tavola : Cambio_Pezzo # 36
Macchina_Pronta : HW_Allarme_Macchina : Allarme_CN # 33
Macchina_Spenta : HW_Allarme_Macchina : Allarme_CN # 33
Fermo_Generico : HW_Allarme_Macchina : Allarme_CN # 33
Lavorazione : HW_Allarme_Macchina : Allarme_CN # 33
Cambio_Pezzo : HW_Allarme_Macchina : Allarme_CN # 33
Rottura_Nastro : HW_Allarme_Macchina : Allarme_CN # 33
Manuale : HW_Allarme_Macchina : Allarme_CN # 33
Scarico_Pieno : HW_Allarme_Macchina : Allarme_CN # 33
Non_Disponibile : HW_Allarme_Macchina : Allarme_CN # 33
Macchina_Pronta : HW_Start_Tavola : Lavorazione # 35
Macchina_Spenta : HW_Start_Tavola : Lavorazione # 35
Fermo_Generico : HW_Start_Tavola : Lavorazione # 35
Cambio_Pezzo : HW_Start_Tavola : Lavorazione # 35
Allarme_CN : HW_Start_Tavola : Lavorazione # 35
Rottura_Nastro : HW_Start_Tavola : Lavorazione # 35
Manuale : HW_Start_Tavola : Lavorazione # 35
Scarico_Pieno : HW_Start_Tavola : Lavorazione # 35
Non_Disponibile : HW_Start_Tavola : Lavorazione # 35
Macchina_Pronta : HW_End_Tavola : Cambio_Pezzo # 36
Macchina_Spenta : HW_End_Tavola : Cambio_Pezzo # 36
Fermo_Generico : HW_End_Tavola : Cambio_Pezzo # 36
Lavorazione : HW_End_Tavola : Cambio_Pezzo # 36
Allarme_CN : HW_End_Tavola : Cambio_Pezzo # 36
Rottura_Nastro : HW_End_Tavola : Cambio_Pezzo # 36
Manuale : HW_End_Tavola : Cambio_Pezzo # 36
Scarico_Pieno : HW_End_Tavola : Cambio_Pezzo # 36
Non_Disponibile : HW_End_Tavola : Cambio_Pezzo # 36
# -------------------------------------------------------------------------------------------------
@@ -8,6 +8,7 @@
# 2023.10.10 In Deroga - ColCom
# 2024.01.18 Barcode Rottura_Utensile - Colcom
# 2024.02.23 Aggiunto Barcode Pausa - 60 - Fluitek
# 2024.07.17 Aggiunti Barcode Lvf - 61 62 63
# ELENCO STATI E EVENTI DI BASE
@@ -59,6 +60,9 @@ $STATE : 57 : Manca_Mater_Tagliato
$STATE : 58 : In_Deroga
$STATE : 59 : Rottura_Utensile
$STATE : 60 : Pausa
$STATE : 61 : Manutenzione_Straordinaria
$STATE : 62 : Manutenzione_Ordinaria
$STATE : 63 : Problemi_di_Lavorazione
#definizione eventi : obbligatorio iniziare da 0 --> select * from AnagraficaEventi
# NOTE
@@ -136,6 +140,9 @@ $EVENT : 57 : Barcode_Manca_Mater_Tagliato
$EVENT : 58 : Barcode_In_Deroga
$EVENT : 59 : Barcode_Rottura_Utensile
$EVENT : 60 : Barcode_Pausa
$EVENT : 61 : Barcode_Manutenzione_Straordinaria
$EVENT : 62 : Barcode_Manutenzione_Ordinaria
$EVENT : 63 : Barcode_Problemi_di_Lavorazione
$RULES
@@ -174,6 +181,10 @@ ALL_STATES : Barcode_Manca_Mater_Tagliato : Manca_Mater_Tagliat
ALL_STATES : Barcode_In_Deroga : In_Deroga # 58
ALL_STATES : Barcode_Rottura_Utensile : Rottura_Utensile # 59
ALL_STATES : Barcode_Pausa : Pausa # 60
ALL_STATES : HW_power_off : Macchina_Spenta # 14
ALL_STATES : Barcode_Manutenzione_Straordinaria : Manutenzione_Straordinaria # 61
ALL_STATES : Barcode_Manutenzione_Ordinaria : Manutenzione_Ordinaria # 62
ALL_STATES : Barcode_Problemi_di_Lavorazione : Problemi_di_Lavorazione # 63
ALL_STATES : HW_power_off : Macchina_Spenta # 14
@@ -0,0 +1,934 @@
IdxFamiglia;IdxStato;IdxTipo;next_IdxStato
11;0;1;1
11;0;2;2
11;0;3;3
11;0;4;4
11;0;5;5
11;0;6;6
11;0;7;7
11;0;8;8
11;0;9;9
11;0;10;10
11;0;12;11
11;0;14;11
11;0;19;30
11;0;26;27
11;0;31;31
11;0;32;32
11;0;37;33
11;0;38;34
11;0;39;35
11;0;49;49
11;0;50;50
11;0;51;51
11;0;52;52
11;1;0;0
11;1;2;2
11;1;3;3
11;1;4;4
11;1;5;5
11;1;6;6
11;1;7;7
11;1;8;8
11;1;9;9
11;1;10;10
11;1;12;11
11;1;14;11
11;1;15;12
11;1;16;13
11;1;17;14
11;1;18;15
11;1;19;30
11;1;20;14
11;1;21;13
11;1;22;14
11;1;23;23
11;1;24;24
11;1;25;25
11;1;26;27
11;1;28;26
11;1;29;28
11;1;30;29
11;1;31;31
11;1;32;32
11;1;33;15
11;1;35;13
11;1;36;14
11;1;37;33
11;1;38;34
11;1;39;35
11;1;49;49
11;1;50;50
11;1;51;51
11;1;52;52
11;2;0;0
11;2;1;1
11;2;3;3
11;2;4;4
11;2;5;5
11;2;6;6
11;2;7;7
11;2;8;8
11;2;9;9
11;2;10;10
11;2;12;11
11;2;14;11
11;2;19;30
11;2;26;27
11;2;28;26
11;2;31;31
11;2;32;32
11;2;37;33
11;2;38;34
11;2;39;35
11;2;49;49
11;2;50;50
11;2;51;51
11;2;52;52
11;3;0;0
11;3;1;1
11;3;2;2
11;3;4;4
11;3;5;5
11;3;6;6
11;3;7;7
11;3;8;8
11;3;9;9
11;3;10;10
11;3;12;11
11;3;14;11
11;3;19;30
11;3;26;27
11;3;28;26
11;3;31;31
11;3;32;32
11;3;37;33
11;3;38;34
11;3;39;35
11;3;49;49
11;3;50;50
11;3;51;51
11;3;52;52
11;4;0;0
11;4;1;1
11;4;2;2
11;4;3;3
11;4;5;5
11;4;6;6
11;4;7;7
11;4;8;8
11;4;9;9
11;4;10;10
11;4;12;11
11;4;14;11
11;4;19;30
11;4;26;27
11;4;28;26
11;4;31;31
11;4;32;32
11;4;37;33
11;4;38;34
11;4;39;35
11;4;49;49
11;4;50;50
11;4;51;51
11;4;52;52
11;5;0;0
11;5;1;1
11;5;2;2
11;5;3;3
11;5;4;4
11;5;6;6
11;5;7;7
11;5;8;8
11;5;9;9
11;5;10;10
11;5;12;11
11;5;14;11
11;5;19;30
11;5;26;27
11;5;28;26
11;5;31;31
11;5;32;32
11;5;37;33
11;5;38;34
11;5;39;35
11;5;49;49
11;5;50;50
11;5;51;51
11;5;52;52
11;6;0;0
11;6;1;1
11;6;2;2
11;6;3;3
11;6;4;4
11;6;5;5
11;6;7;7
11;6;8;8
11;6;9;9
11;6;10;10
11;6;12;11
11;6;14;11
11;6;19;30
11;6;26;27
11;6;28;26
11;6;31;31
11;6;32;32
11;6;37;33
11;6;38;34
11;6;39;35
11;6;49;49
11;6;50;50
11;6;51;51
11;6;52;52
11;7;0;0
11;7;1;1
11;7;2;2
11;7;3;3
11;7;4;4
11;7;5;5
11;7;6;6
11;7;8;8
11;7;9;9
11;7;10;10
11;7;12;11
11;7;14;11
11;7;19;30
11;7;26;27
11;7;28;26
11;7;31;31
11;7;32;32
11;7;37;33
11;7;38;34
11;7;39;35
11;7;49;49
11;7;50;50
11;7;51;51
11;7;52;52
11;8;0;0
11;8;1;1
11;8;2;2
11;8;3;3
11;8;4;4
11;8;5;5
11;8;6;6
11;8;7;7
11;8;9;9
11;8;10;10
11;8;12;11
11;8;14;11
11;8;19;30
11;8;26;27
11;8;28;26
11;8;31;31
11;8;32;32
11;8;37;33
11;8;38;34
11;8;39;35
11;8;49;49
11;8;50;50
11;8;51;51
11;8;52;52
11;9;0;0
11;9;1;1
11;9;2;2
11;9;3;3
11;9;4;4
11;9;5;5
11;9;6;6
11;9;7;7
11;9;8;8
11;9;10;10
11;9;12;11
11;9;14;11
11;9;19;30
11;9;26;27
11;9;28;26
11;9;31;31
11;9;32;32
11;9;37;33
11;9;38;34
11;9;39;35
11;9;49;49
11;9;50;50
11;9;51;51
11;9;52;52
11;10;0;0
11;10;1;1
11;10;2;2
11;10;3;3
11;10;4;4
11;10;5;5
11;10;6;6
11;10;7;7
11;10;8;8
11;10;9;9
11;10;12;11
11;10;14;11
11;10;19;30
11;10;26;27
11;10;28;26
11;10;31;31
11;10;32;32
11;10;37;33
11;10;38;34
11;10;39;35
11;10;49;49
11;10;50;50
11;10;51;51
11;10;52;52
11;11;0;0
11;11;1;1
11;11;2;2
11;11;3;3
11;11;4;4
11;11;5;5
11;11;6;6
11;11;7;7
11;11;8;8
11;11;9;9
11;11;10;10
11;11;15;12
11;11;16;13
11;11;17;14
11;11;18;15
11;11;19;30
11;11;20;14
11;11;21;13
11;11;22;14
11;11;23;23
11;11;24;24
11;11;25;25
11;11;26;27
11;11;29;28
11;11;30;29
11;11;31;31
11;11;32;32
11;11;33;15
11;11;35;13
11;11;36;14
11;11;37;33
11;11;38;34
11;11;39;35
11;11;49;49
11;11;50;50
11;11;51;51
11;11;52;52
11;12;0;0
11;12;1;1
11;12;2;2
11;12;3;3
11;12;4;4
11;12;5;5
11;12;6;6
11;12;7;7
11;12;8;8
11;12;9;9
11;12;10;10
11;12;12;11
11;12;14;11
11;12;16;13
11;12;17;14
11;12;18;15
11;12;19;30
11;12;20;14
11;12;21;13
11;12;22;14
11;12;23;23
11;12;24;24
11;12;25;25
11;12;26;27
11;12;28;26
11;12;29;28
11;12;30;29
11;12;31;31
11;12;32;32
11;12;33;15
11;12;35;13
11;12;36;14
11;12;37;33
11;12;38;34
11;12;39;35
11;12;49;49
11;12;50;50
11;12;51;51
11;12;52;52
11;13;0;0
11;13;1;1
11;13;2;2
11;13;3;3
11;13;4;4
11;13;5;5
11;13;6;6
11;13;7;7
11;13;8;8
11;13;9;9
11;13;10;10
11;13;12;11
11;13;14;11
11;13;15;12
11;13;17;14
11;13;18;15
11;13;19;30
11;13;20;14
11;13;22;14
11;13;23;23
11;13;24;24
11;13;25;25
11;13;26;27
11;13;27;12
11;13;28;26
11;13;29;28
11;13;30;29
11;13;31;31
11;13;32;32
11;13;33;15
11;13;36;14
11;13;37;33
11;13;38;34
11;13;39;35
11;13;49;49
11;13;50;50
11;13;51;51
11;13;52;52
11;14;0;0
11;14;1;1
11;14;2;2
11;14;3;3
11;14;4;4
11;14;5;5
11;14;6;6
11;14;7;7
11;14;8;8
11;14;9;9
11;14;10;10
11;14;12;11
11;14;14;11
11;14;15;12
11;14;16;13
11;14;18;15
11;14;19;30
11;14;21;13
11;14;23;23
11;14;24;24
11;14;25;25
11;14;26;27
11;14;28;26
11;14;29;28
11;14;30;29
11;14;31;31
11;14;32;32
11;14;33;15
11;14;35;13
11;14;37;33
11;14;38;34
11;14;39;35
11;14;49;49
11;14;50;50
11;14;51;51
11;14;52;52
11;15;0;0
11;15;1;1
11;15;2;2
11;15;3;3
11;15;4;4
11;15;5;5
11;15;6;6
11;15;7;7
11;15;8;8
11;15;9;9
11;15;10;10
11;15;12;11
11;15;14;11
11;15;15;12
11;15;16;13
11;15;17;14
11;15;19;30
11;15;20;14
11;15;21;13
11;15;22;14
11;15;23;23
11;15;24;24
11;15;25;25
11;15;26;27
11;15;28;26
11;15;29;28
11;15;30;29
11;15;31;31
11;15;32;32
11;15;35;13
11;15;36;14
11;15;37;33
11;15;38;34
11;15;39;35
11;15;49;49
11;15;50;50
11;15;51;51
11;15;52;52
11;23;0;0
11;23;1;1
11;23;2;2
11;23;3;3
11;23;4;4
11;23;5;5
11;23;6;6
11;23;7;7
11;23;8;8
11;23;9;9
11;23;10;10
11;23;12;11
11;23;14;11
11;23;15;12
11;23;16;13
11;23;17;14
11;23;18;15
11;23;19;30
11;23;20;14
11;23;21;13
11;23;22;14
11;23;24;24
11;23;25;25
11;23;26;27
11;23;28;26
11;23;29;28
11;23;30;29
11;23;31;31
11;23;32;32
11;23;33;15
11;23;35;13
11;23;36;14
11;23;37;33
11;23;38;34
11;23;39;35
11;23;49;49
11;23;50;50
11;23;51;51
11;23;52;52
11;24;0;0
11;24;1;1
11;24;2;2
11;24;3;3
11;24;4;4
11;24;5;5
11;24;6;6
11;24;7;7
11;24;8;8
11;24;9;9
11;24;10;10
11;24;12;11
11;24;14;11
11;24;15;12
11;24;16;13
11;24;17;14
11;24;18;15
11;24;19;30
11;24;20;14
11;24;21;13
11;24;22;14
11;24;23;23
11;24;25;25
11;24;26;27
11;24;28;26
11;24;29;28
11;24;30;29
11;24;31;31
11;24;32;32
11;24;33;15
11;24;35;13
11;24;36;14
11;24;37;33
11;24;38;34
11;24;39;35
11;24;49;49
11;24;50;50
11;24;51;51
11;24;52;52
11;25;0;0
11;25;1;1
11;25;2;2
11;25;3;3
11;25;4;4
11;25;5;5
11;25;6;6
11;25;7;7
11;25;8;8
11;25;9;9
11;25;10;10
11;25;12;11
11;25;14;11
11;25;16;13
11;25;17;14
11;25;18;15
11;25;19;30
11;25;20;14
11;25;21;13
11;25;22;14
11;25;23;23
11;25;24;24
11;25;26;27
11;25;28;26
11;25;29;28
11;25;30;29
11;25;31;31
11;25;32;32
11;25;33;15
11;25;35;13
11;25;36;14
11;25;37;33
11;25;38;34
11;25;39;35
11;25;49;49
11;25;50;50
11;25;51;51
11;25;52;52
11;26;0;0
11;26;1;1
11;26;2;2
11;26;3;3
11;26;4;4
11;26;5;5
11;26;6;6
11;26;7;7
11;26;8;8
11;26;9;9
11;26;10;10
11;26;12;11
11;26;14;11
11;26;15;12
11;26;16;13
11;26;17;14
11;26;18;15
11;26;19;30
11;26;20;14
11;26;21;13
11;26;22;14
11;26;23;23
11;26;24;24
11;26;25;25
11;26;26;27
11;26;29;28
11;26;30;29
11;26;31;31
11;26;32;32
11;26;33;15
11;26;35;13
11;26;36;14
11;26;37;33
11;26;38;34
11;26;39;35
11;26;49;49
11;26;50;50
11;26;51;51
11;26;52;52
11;27;0;0
11;27;1;1
11;27;2;2
11;27;3;3
11;27;4;4
11;27;5;5
11;27;6;6
11;27;7;7
11;27;8;8
11;27;9;9
11;27;10;10
11;27;12;11
11;27;14;11
11;27;19;30
11;27;28;26
11;27;31;31
11;27;32;32
11;27;37;33
11;27;38;34
11;27;39;35
11;27;49;49
11;27;50;50
11;27;51;51
11;27;52;52
11;28;0;0
11;28;1;1
11;28;2;2
11;28;3;3
11;28;4;4
11;28;5;5
11;28;6;6
11;28;7;7
11;28;8;8
11;28;9;9
11;28;10;10
11;28;12;11
11;28;14;11
11;28;16;13
11;28;19;30
11;28;26;27
11;28;31;31
11;28;32;32
11;28;37;33
11;28;38;34
11;28;39;35
11;28;49;49
11;28;50;50
11;28;51;51
11;28;52;52
11;29;0;0
11;29;1;1
11;29;2;2
11;29;3;3
11;29;4;4
11;29;5;5
11;29;6;6
11;29;7;7
11;29;8;8
11;29;9;9
11;29;10;10
11;29;12;11
11;29;14;11
11;29;16;13
11;29;19;30
11;29;26;27
11;29;31;31
11;29;32;32
11;29;37;33
11;29;38;34
11;29;39;35
11;29;49;49
11;29;50;50
11;29;51;51
11;29;52;52
11;30;0;0
11;30;1;1
11;30;2;2
11;30;3;3
11;30;4;4
11;30;5;5
11;30;6;6
11;30;7;7
11;30;8;8
11;30;9;9
11;30;10;10
11;30;12;11
11;30;14;11
11;30;26;27
11;30;31;31
11;30;32;32
11;30;37;33
11;30;38;34
11;30;39;35
11;30;49;49
11;30;50;50
11;30;51;51
11;30;52;52
11;31;0;0
11;31;1;1
11;31;2;2
11;31;3;3
11;31;4;4
11;31;5;5
11;31;6;6
11;31;7;7
11;31;8;8
11;31;9;9
11;31;10;10
11;31;12;11
11;31;14;11
11;31;19;30
11;31;26;27
11;31;28;26
11;31;32;32
11;31;37;33
11;31;38;34
11;31;39;35
11;31;49;49
11;31;50;50
11;31;51;51
11;31;52;52
11;32;0;0
11;32;1;1
11;32;2;2
11;32;3;3
11;32;4;4
11;32;5;5
11;32;6;6
11;32;7;7
11;32;8;8
11;32;9;9
11;32;10;10
11;32;12;11
11;32;14;11
11;32;19;30
11;32;26;27
11;32;28;26
11;32;31;31
11;32;37;33
11;32;38;34
11;32;39;35
11;32;49;49
11;32;50;50
11;32;51;51
11;32;52;52
11;33;0;0
11;33;1;1
11;33;2;2
11;33;3;3
11;33;4;4
11;33;5;5
11;33;6;6
11;33;7;7
11;33;8;8
11;33;9;9
11;33;10;10
11;33;12;11
11;33;14;11
11;33;19;30
11;33;26;27
11;33;28;26
11;33;31;31
11;33;32;32
11;33;38;34
11;33;39;35
11;33;49;49
11;33;50;50
11;33;51;51
11;33;52;52
11;34;0;0
11;34;1;1
11;34;2;2
11;34;3;3
11;34;4;4
11;34;5;5
11;34;6;6
11;34;7;7
11;34;8;8
11;34;9;9
11;34;10;10
11;34;12;11
11;34;14;11
11;34;15;12
11;34;16;13
11;34;19;30
11;34;26;27
11;34;28;26
11;34;31;31
11;34;32;32
11;34;37;33
11;34;39;35
11;34;49;49
11;34;50;50
11;34;51;51
11;34;52;52
11;35;0;0
11;35;1;1
11;35;2;2
11;35;3;3
11;35;4;4
11;35;5;5
11;35;6;6
11;35;7;7
11;35;8;8
11;35;9;9
11;35;10;10
11;35;12;11
11;35;14;11
11;35;19;30
11;35;26;27
11;35;28;26
11;35;31;31
11;35;32;32
11;35;37;33
11;35;38;34
11;35;49;49
11;35;50;50
11;35;51;51
11;35;52;52
11;49;0;0
11;49;1;1
11;49;2;2
11;49;3;3
11;49;4;4
11;49;5;5
11;49;6;6
11;49;7;7
11;49;8;8
11;49;9;9
11;49;10;10
11;49;12;11
11;49;14;11
11;49;19;30
11;49;26;27
11;49;28;26
11;49;31;31
11;49;32;32
11;49;37;33
11;49;38;34
11;49;39;35
11;49;50;50
11;49;51;51
11;49;52;52
11;50;0;0
11;50;1;1
11;50;2;2
11;50;3;3
11;50;4;4
11;50;5;5
11;50;6;6
11;50;7;7
11;50;8;8
11;50;9;9
11;50;10;10
11;50;12;11
11;50;14;11
11;50;19;30
11;50;26;27
11;50;31;31
11;50;32;32
11;50;37;33
11;50;38;34
11;50;39;35
11;50;49;49
11;50;51;51
11;50;52;52
11;51;0;0
11;51;1;1
11;51;2;2
11;51;3;3
11;51;4;4
11;51;5;5
11;51;6;6
11;51;7;7
11;51;8;8
11;51;9;9
11;51;10;10
11;51;12;11
11;51;14;11
11;51;19;30
11;51;26;27
11;51;31;31
11;51;32;32
11;51;37;33
11;51;38;34
11;51;39;35
11;51;49;49
11;51;50;50
11;51;52;52
11;52;0;0
11;52;1;1
11;52;2;2
11;52;3;3
11;52;4;4
11;52;5;5
11;52;6;6
11;52;7;7
11;52;8;8
11;52;9;9
11;52;10;10
11;52;12;11
11;52;14;11
11;52;19;30
11;52;26;27
11;52;31;31
11;52;32;32
11;52;37;33
11;52;38;34
11;52;39;35
11;52;49;49
11;52;50;50
11;52;51;51
1 IdxFamiglia IdxStato IdxTipo next_IdxStato
2 11 0 1 1
3 11 0 2 2
4 11 0 3 3
5 11 0 4 4
6 11 0 5 5
7 11 0 6 6
8 11 0 7 7
9 11 0 8 8
10 11 0 9 9
11 11 0 10 10
12 11 0 12 11
13 11 0 14 11
14 11 0 19 30
15 11 0 26 27
16 11 0 31 31
17 11 0 32 32
18 11 0 37 33
19 11 0 38 34
20 11 0 39 35
21 11 0 49 49
22 11 0 50 50
23 11 0 51 51
24 11 0 52 52
25 11 1 0 0
26 11 1 2 2
27 11 1 3 3
28 11 1 4 4
29 11 1 5 5
30 11 1 6 6
31 11 1 7 7
32 11 1 8 8
33 11 1 9 9
34 11 1 10 10
35 11 1 12 11
36 11 1 14 11
37 11 1 15 12
38 11 1 16 13
39 11 1 17 14
40 11 1 18 15
41 11 1 19 30
42 11 1 20 14
43 11 1 21 13
44 11 1 22 14
45 11 1 23 23
46 11 1 24 24
47 11 1 25 25
48 11 1 26 27
49 11 1 28 26
50 11 1 29 28
51 11 1 30 29
52 11 1 31 31
53 11 1 32 32
54 11 1 33 15
55 11 1 35 13
56 11 1 36 14
57 11 1 37 33
58 11 1 38 34
59 11 1 39 35
60 11 1 49 49
61 11 1 50 50
62 11 1 51 51
63 11 1 52 52
64 11 2 0 0
65 11 2 1 1
66 11 2 3 3
67 11 2 4 4
68 11 2 5 5
69 11 2 6 6
70 11 2 7 7
71 11 2 8 8
72 11 2 9 9
73 11 2 10 10
74 11 2 12 11
75 11 2 14 11
76 11 2 19 30
77 11 2 26 27
78 11 2 28 26
79 11 2 31 31
80 11 2 32 32
81 11 2 37 33
82 11 2 38 34
83 11 2 39 35
84 11 2 49 49
85 11 2 50 50
86 11 2 51 51
87 11 2 52 52
88 11 3 0 0
89 11 3 1 1
90 11 3 2 2
91 11 3 4 4
92 11 3 5 5
93 11 3 6 6
94 11 3 7 7
95 11 3 8 8
96 11 3 9 9
97 11 3 10 10
98 11 3 12 11
99 11 3 14 11
100 11 3 19 30
101 11 3 26 27
102 11 3 28 26
103 11 3 31 31
104 11 3 32 32
105 11 3 37 33
106 11 3 38 34
107 11 3 39 35
108 11 3 49 49
109 11 3 50 50
110 11 3 51 51
111 11 3 52 52
112 11 4 0 0
113 11 4 1 1
114 11 4 2 2
115 11 4 3 3
116 11 4 5 5
117 11 4 6 6
118 11 4 7 7
119 11 4 8 8
120 11 4 9 9
121 11 4 10 10
122 11 4 12 11
123 11 4 14 11
124 11 4 19 30
125 11 4 26 27
126 11 4 28 26
127 11 4 31 31
128 11 4 32 32
129 11 4 37 33
130 11 4 38 34
131 11 4 39 35
132 11 4 49 49
133 11 4 50 50
134 11 4 51 51
135 11 4 52 52
136 11 5 0 0
137 11 5 1 1
138 11 5 2 2
139 11 5 3 3
140 11 5 4 4
141 11 5 6 6
142 11 5 7 7
143 11 5 8 8
144 11 5 9 9
145 11 5 10 10
146 11 5 12 11
147 11 5 14 11
148 11 5 19 30
149 11 5 26 27
150 11 5 28 26
151 11 5 31 31
152 11 5 32 32
153 11 5 37 33
154 11 5 38 34
155 11 5 39 35
156 11 5 49 49
157 11 5 50 50
158 11 5 51 51
159 11 5 52 52
160 11 6 0 0
161 11 6 1 1
162 11 6 2 2
163 11 6 3 3
164 11 6 4 4
165 11 6 5 5
166 11 6 7 7
167 11 6 8 8
168 11 6 9 9
169 11 6 10 10
170 11 6 12 11
171 11 6 14 11
172 11 6 19 30
173 11 6 26 27
174 11 6 28 26
175 11 6 31 31
176 11 6 32 32
177 11 6 37 33
178 11 6 38 34
179 11 6 39 35
180 11 6 49 49
181 11 6 50 50
182 11 6 51 51
183 11 6 52 52
184 11 7 0 0
185 11 7 1 1
186 11 7 2 2
187 11 7 3 3
188 11 7 4 4
189 11 7 5 5
190 11 7 6 6
191 11 7 8 8
192 11 7 9 9
193 11 7 10 10
194 11 7 12 11
195 11 7 14 11
196 11 7 19 30
197 11 7 26 27
198 11 7 28 26
199 11 7 31 31
200 11 7 32 32
201 11 7 37 33
202 11 7 38 34
203 11 7 39 35
204 11 7 49 49
205 11 7 50 50
206 11 7 51 51
207 11 7 52 52
208 11 8 0 0
209 11 8 1 1
210 11 8 2 2
211 11 8 3 3
212 11 8 4 4
213 11 8 5 5
214 11 8 6 6
215 11 8 7 7
216 11 8 9 9
217 11 8 10 10
218 11 8 12 11
219 11 8 14 11
220 11 8 19 30
221 11 8 26 27
222 11 8 28 26
223 11 8 31 31
224 11 8 32 32
225 11 8 37 33
226 11 8 38 34
227 11 8 39 35
228 11 8 49 49
229 11 8 50 50
230 11 8 51 51
231 11 8 52 52
232 11 9 0 0
233 11 9 1 1
234 11 9 2 2
235 11 9 3 3
236 11 9 4 4
237 11 9 5 5
238 11 9 6 6
239 11 9 7 7
240 11 9 8 8
241 11 9 10 10
242 11 9 12 11
243 11 9 14 11
244 11 9 19 30
245 11 9 26 27
246 11 9 28 26
247 11 9 31 31
248 11 9 32 32
249 11 9 37 33
250 11 9 38 34
251 11 9 39 35
252 11 9 49 49
253 11 9 50 50
254 11 9 51 51
255 11 9 52 52
256 11 10 0 0
257 11 10 1 1
258 11 10 2 2
259 11 10 3 3
260 11 10 4 4
261 11 10 5 5
262 11 10 6 6
263 11 10 7 7
264 11 10 8 8
265 11 10 9 9
266 11 10 12 11
267 11 10 14 11
268 11 10 19 30
269 11 10 26 27
270 11 10 28 26
271 11 10 31 31
272 11 10 32 32
273 11 10 37 33
274 11 10 38 34
275 11 10 39 35
276 11 10 49 49
277 11 10 50 50
278 11 10 51 51
279 11 10 52 52
280 11 11 0 0
281 11 11 1 1
282 11 11 2 2
283 11 11 3 3
284 11 11 4 4
285 11 11 5 5
286 11 11 6 6
287 11 11 7 7
288 11 11 8 8
289 11 11 9 9
290 11 11 10 10
291 11 11 15 12
292 11 11 16 13
293 11 11 17 14
294 11 11 18 15
295 11 11 19 30
296 11 11 20 14
297 11 11 21 13
298 11 11 22 14
299 11 11 23 23
300 11 11 24 24
301 11 11 25 25
302 11 11 26 27
303 11 11 29 28
304 11 11 30 29
305 11 11 31 31
306 11 11 32 32
307 11 11 33 15
308 11 11 35 13
309 11 11 36 14
310 11 11 37 33
311 11 11 38 34
312 11 11 39 35
313 11 11 49 49
314 11 11 50 50
315 11 11 51 51
316 11 11 52 52
317 11 12 0 0
318 11 12 1 1
319 11 12 2 2
320 11 12 3 3
321 11 12 4 4
322 11 12 5 5
323 11 12 6 6
324 11 12 7 7
325 11 12 8 8
326 11 12 9 9
327 11 12 10 10
328 11 12 12 11
329 11 12 14 11
330 11 12 16 13
331 11 12 17 14
332 11 12 18 15
333 11 12 19 30
334 11 12 20 14
335 11 12 21 13
336 11 12 22 14
337 11 12 23 23
338 11 12 24 24
339 11 12 25 25
340 11 12 26 27
341 11 12 28 26
342 11 12 29 28
343 11 12 30 29
344 11 12 31 31
345 11 12 32 32
346 11 12 33 15
347 11 12 35 13
348 11 12 36 14
349 11 12 37 33
350 11 12 38 34
351 11 12 39 35
352 11 12 49 49
353 11 12 50 50
354 11 12 51 51
355 11 12 52 52
356 11 13 0 0
357 11 13 1 1
358 11 13 2 2
359 11 13 3 3
360 11 13 4 4
361 11 13 5 5
362 11 13 6 6
363 11 13 7 7
364 11 13 8 8
365 11 13 9 9
366 11 13 10 10
367 11 13 12 11
368 11 13 14 11
369 11 13 15 12
370 11 13 17 14
371 11 13 18 15
372 11 13 19 30
373 11 13 20 14
374 11 13 22 14
375 11 13 23 23
376 11 13 24 24
377 11 13 25 25
378 11 13 26 27
379 11 13 27 12
380 11 13 28 26
381 11 13 29 28
382 11 13 30 29
383 11 13 31 31
384 11 13 32 32
385 11 13 33 15
386 11 13 36 14
387 11 13 37 33
388 11 13 38 34
389 11 13 39 35
390 11 13 49 49
391 11 13 50 50
392 11 13 51 51
393 11 13 52 52
394 11 14 0 0
395 11 14 1 1
396 11 14 2 2
397 11 14 3 3
398 11 14 4 4
399 11 14 5 5
400 11 14 6 6
401 11 14 7 7
402 11 14 8 8
403 11 14 9 9
404 11 14 10 10
405 11 14 12 11
406 11 14 14 11
407 11 14 15 12
408 11 14 16 13
409 11 14 18 15
410 11 14 19 30
411 11 14 21 13
412 11 14 23 23
413 11 14 24 24
414 11 14 25 25
415 11 14 26 27
416 11 14 28 26
417 11 14 29 28
418 11 14 30 29
419 11 14 31 31
420 11 14 32 32
421 11 14 33 15
422 11 14 35 13
423 11 14 37 33
424 11 14 38 34
425 11 14 39 35
426 11 14 49 49
427 11 14 50 50
428 11 14 51 51
429 11 14 52 52
430 11 15 0 0
431 11 15 1 1
432 11 15 2 2
433 11 15 3 3
434 11 15 4 4
435 11 15 5 5
436 11 15 6 6
437 11 15 7 7
438 11 15 8 8
439 11 15 9 9
440 11 15 10 10
441 11 15 12 11
442 11 15 14 11
443 11 15 15 12
444 11 15 16 13
445 11 15 17 14
446 11 15 19 30
447 11 15 20 14
448 11 15 21 13
449 11 15 22 14
450 11 15 23 23
451 11 15 24 24
452 11 15 25 25
453 11 15 26 27
454 11 15 28 26
455 11 15 29 28
456 11 15 30 29
457 11 15 31 31
458 11 15 32 32
459 11 15 35 13
460 11 15 36 14
461 11 15 37 33
462 11 15 38 34
463 11 15 39 35
464 11 15 49 49
465 11 15 50 50
466 11 15 51 51
467 11 15 52 52
468 11 23 0 0
469 11 23 1 1
470 11 23 2 2
471 11 23 3 3
472 11 23 4 4
473 11 23 5 5
474 11 23 6 6
475 11 23 7 7
476 11 23 8 8
477 11 23 9 9
478 11 23 10 10
479 11 23 12 11
480 11 23 14 11
481 11 23 15 12
482 11 23 16 13
483 11 23 17 14
484 11 23 18 15
485 11 23 19 30
486 11 23 20 14
487 11 23 21 13
488 11 23 22 14
489 11 23 24 24
490 11 23 25 25
491 11 23 26 27
492 11 23 28 26
493 11 23 29 28
494 11 23 30 29
495 11 23 31 31
496 11 23 32 32
497 11 23 33 15
498 11 23 35 13
499 11 23 36 14
500 11 23 37 33
501 11 23 38 34
502 11 23 39 35
503 11 23 49 49
504 11 23 50 50
505 11 23 51 51
506 11 23 52 52
507 11 24 0 0
508 11 24 1 1
509 11 24 2 2
510 11 24 3 3
511 11 24 4 4
512 11 24 5 5
513 11 24 6 6
514 11 24 7 7
515 11 24 8 8
516 11 24 9 9
517 11 24 10 10
518 11 24 12 11
519 11 24 14 11
520 11 24 15 12
521 11 24 16 13
522 11 24 17 14
523 11 24 18 15
524 11 24 19 30
525 11 24 20 14
526 11 24 21 13
527 11 24 22 14
528 11 24 23 23
529 11 24 25 25
530 11 24 26 27
531 11 24 28 26
532 11 24 29 28
533 11 24 30 29
534 11 24 31 31
535 11 24 32 32
536 11 24 33 15
537 11 24 35 13
538 11 24 36 14
539 11 24 37 33
540 11 24 38 34
541 11 24 39 35
542 11 24 49 49
543 11 24 50 50
544 11 24 51 51
545 11 24 52 52
546 11 25 0 0
547 11 25 1 1
548 11 25 2 2
549 11 25 3 3
550 11 25 4 4
551 11 25 5 5
552 11 25 6 6
553 11 25 7 7
554 11 25 8 8
555 11 25 9 9
556 11 25 10 10
557 11 25 12 11
558 11 25 14 11
559 11 25 16 13
560 11 25 17 14
561 11 25 18 15
562 11 25 19 30
563 11 25 20 14
564 11 25 21 13
565 11 25 22 14
566 11 25 23 23
567 11 25 24 24
568 11 25 26 27
569 11 25 28 26
570 11 25 29 28
571 11 25 30 29
572 11 25 31 31
573 11 25 32 32
574 11 25 33 15
575 11 25 35 13
576 11 25 36 14
577 11 25 37 33
578 11 25 38 34
579 11 25 39 35
580 11 25 49 49
581 11 25 50 50
582 11 25 51 51
583 11 25 52 52
584 11 26 0 0
585 11 26 1 1
586 11 26 2 2
587 11 26 3 3
588 11 26 4 4
589 11 26 5 5
590 11 26 6 6
591 11 26 7 7
592 11 26 8 8
593 11 26 9 9
594 11 26 10 10
595 11 26 12 11
596 11 26 14 11
597 11 26 15 12
598 11 26 16 13
599 11 26 17 14
600 11 26 18 15
601 11 26 19 30
602 11 26 20 14
603 11 26 21 13
604 11 26 22 14
605 11 26 23 23
606 11 26 24 24
607 11 26 25 25
608 11 26 26 27
609 11 26 29 28
610 11 26 30 29
611 11 26 31 31
612 11 26 32 32
613 11 26 33 15
614 11 26 35 13
615 11 26 36 14
616 11 26 37 33
617 11 26 38 34
618 11 26 39 35
619 11 26 49 49
620 11 26 50 50
621 11 26 51 51
622 11 26 52 52
623 11 27 0 0
624 11 27 1 1
625 11 27 2 2
626 11 27 3 3
627 11 27 4 4
628 11 27 5 5
629 11 27 6 6
630 11 27 7 7
631 11 27 8 8
632 11 27 9 9
633 11 27 10 10
634 11 27 12 11
635 11 27 14 11
636 11 27 19 30
637 11 27 28 26
638 11 27 31 31
639 11 27 32 32
640 11 27 37 33
641 11 27 38 34
642 11 27 39 35
643 11 27 49 49
644 11 27 50 50
645 11 27 51 51
646 11 27 52 52
647 11 28 0 0
648 11 28 1 1
649 11 28 2 2
650 11 28 3 3
651 11 28 4 4
652 11 28 5 5
653 11 28 6 6
654 11 28 7 7
655 11 28 8 8
656 11 28 9 9
657 11 28 10 10
658 11 28 12 11
659 11 28 14 11
660 11 28 16 13
661 11 28 19 30
662 11 28 26 27
663 11 28 31 31
664 11 28 32 32
665 11 28 37 33
666 11 28 38 34
667 11 28 39 35
668 11 28 49 49
669 11 28 50 50
670 11 28 51 51
671 11 28 52 52
672 11 29 0 0
673 11 29 1 1
674 11 29 2 2
675 11 29 3 3
676 11 29 4 4
677 11 29 5 5
678 11 29 6 6
679 11 29 7 7
680 11 29 8 8
681 11 29 9 9
682 11 29 10 10
683 11 29 12 11
684 11 29 14 11
685 11 29 16 13
686 11 29 19 30
687 11 29 26 27
688 11 29 31 31
689 11 29 32 32
690 11 29 37 33
691 11 29 38 34
692 11 29 39 35
693 11 29 49 49
694 11 29 50 50
695 11 29 51 51
696 11 29 52 52
697 11 30 0 0
698 11 30 1 1
699 11 30 2 2
700 11 30 3 3
701 11 30 4 4
702 11 30 5 5
703 11 30 6 6
704 11 30 7 7
705 11 30 8 8
706 11 30 9 9
707 11 30 10 10
708 11 30 12 11
709 11 30 14 11
710 11 30 26 27
711 11 30 31 31
712 11 30 32 32
713 11 30 37 33
714 11 30 38 34
715 11 30 39 35
716 11 30 49 49
717 11 30 50 50
718 11 30 51 51
719 11 30 52 52
720 11 31 0 0
721 11 31 1 1
722 11 31 2 2
723 11 31 3 3
724 11 31 4 4
725 11 31 5 5
726 11 31 6 6
727 11 31 7 7
728 11 31 8 8
729 11 31 9 9
730 11 31 10 10
731 11 31 12 11
732 11 31 14 11
733 11 31 19 30
734 11 31 26 27
735 11 31 28 26
736 11 31 32 32
737 11 31 37 33
738 11 31 38 34
739 11 31 39 35
740 11 31 49 49
741 11 31 50 50
742 11 31 51 51
743 11 31 52 52
744 11 32 0 0
745 11 32 1 1
746 11 32 2 2
747 11 32 3 3
748 11 32 4 4
749 11 32 5 5
750 11 32 6 6
751 11 32 7 7
752 11 32 8 8
753 11 32 9 9
754 11 32 10 10
755 11 32 12 11
756 11 32 14 11
757 11 32 19 30
758 11 32 26 27
759 11 32 28 26
760 11 32 31 31
761 11 32 37 33
762 11 32 38 34
763 11 32 39 35
764 11 32 49 49
765 11 32 50 50
766 11 32 51 51
767 11 32 52 52
768 11 33 0 0
769 11 33 1 1
770 11 33 2 2
771 11 33 3 3
772 11 33 4 4
773 11 33 5 5
774 11 33 6 6
775 11 33 7 7
776 11 33 8 8
777 11 33 9 9
778 11 33 10 10
779 11 33 12 11
780 11 33 14 11
781 11 33 19 30
782 11 33 26 27
783 11 33 28 26
784 11 33 31 31
785 11 33 32 32
786 11 33 38 34
787 11 33 39 35
788 11 33 49 49
789 11 33 50 50
790 11 33 51 51
791 11 33 52 52
792 11 34 0 0
793 11 34 1 1
794 11 34 2 2
795 11 34 3 3
796 11 34 4 4
797 11 34 5 5
798 11 34 6 6
799 11 34 7 7
800 11 34 8 8
801 11 34 9 9
802 11 34 10 10
803 11 34 12 11
804 11 34 14 11
805 11 34 15 12
806 11 34 16 13
807 11 34 19 30
808 11 34 26 27
809 11 34 28 26
810 11 34 31 31
811 11 34 32 32
812 11 34 37 33
813 11 34 39 35
814 11 34 49 49
815 11 34 50 50
816 11 34 51 51
817 11 34 52 52
818 11 35 0 0
819 11 35 1 1
820 11 35 2 2
821 11 35 3 3
822 11 35 4 4
823 11 35 5 5
824 11 35 6 6
825 11 35 7 7
826 11 35 8 8
827 11 35 9 9
828 11 35 10 10
829 11 35 12 11
830 11 35 14 11
831 11 35 19 30
832 11 35 26 27
833 11 35 28 26
834 11 35 31 31
835 11 35 32 32
836 11 35 37 33
837 11 35 38 34
838 11 35 49 49
839 11 35 50 50
840 11 35 51 51
841 11 35 52 52
842 11 49 0 0
843 11 49 1 1
844 11 49 2 2
845 11 49 3 3
846 11 49 4 4
847 11 49 5 5
848 11 49 6 6
849 11 49 7 7
850 11 49 8 8
851 11 49 9 9
852 11 49 10 10
853 11 49 12 11
854 11 49 14 11
855 11 49 19 30
856 11 49 26 27
857 11 49 28 26
858 11 49 31 31
859 11 49 32 32
860 11 49 37 33
861 11 49 38 34
862 11 49 39 35
863 11 49 50 50
864 11 49 51 51
865 11 49 52 52
866 11 50 0 0
867 11 50 1 1
868 11 50 2 2
869 11 50 3 3
870 11 50 4 4
871 11 50 5 5
872 11 50 6 6
873 11 50 7 7
874 11 50 8 8
875 11 50 9 9
876 11 50 10 10
877 11 50 12 11
878 11 50 14 11
879 11 50 19 30
880 11 50 26 27
881 11 50 31 31
882 11 50 32 32
883 11 50 37 33
884 11 50 38 34
885 11 50 39 35
886 11 50 49 49
887 11 50 51 51
888 11 50 52 52
889 11 51 0 0
890 11 51 1 1
891 11 51 2 2
892 11 51 3 3
893 11 51 4 4
894 11 51 5 5
895 11 51 6 6
896 11 51 7 7
897 11 51 8 8
898 11 51 9 9
899 11 51 10 10
900 11 51 12 11
901 11 51 14 11
902 11 51 19 30
903 11 51 26 27
904 11 51 31 31
905 11 51 32 32
906 11 51 37 33
907 11 51 38 34
908 11 51 39 35
909 11 51 49 49
910 11 51 50 50
911 11 51 52 52
912 11 52 0 0
913 11 52 1 1
914 11 52 2 2
915 11 52 3 3
916 11 52 4 4
917 11 52 5 5
918 11 52 6 6
919 11 52 7 7
920 11 52 8 8
921 11 52 9 9
922 11 52 10 10
923 11 52 12 11
924 11 52 14 11
925 11 52 19 30
926 11 52 26 27
927 11 52 31 31
928 11 52 32 32
929 11 52 37 33
930 11 52 38 34
931 11 52 39 35
932 11 52 49 49
933 11 52 50 50
934 11 52 51 51
@@ -0,0 +1,327 @@
#
# Famiglia Macchine : 11 - Donati - base
#
# **** ATTENZIONE!!! ***** Se si aggiunge un Evento o uno Stato va prima aggiunto nel FILE MASTER ELENCO_EVENTI_E_STATI_MASTER.rul se non presente
#
# 2023.09.26 Creata partendo da RUL vecchia su DB e aggiunti\spostati gli eventi 37,38 e relativi Stati (vanno poi fatte sistemazione lato DB)
# 2024.03.27 Sistemazione allineamento e Intestazione
#
#
$DEFINITIONS
$NAME : FAMIGLIA_11
$IDX : 11
#definizione stati (MACRO) : obbligatorio iniziare da 0 --> select * from AnagraficaStati
#
# 27 MancaRifornMPD -> Manca_Materia_Prima
#
$STATE : 0 : ND
$STATE : 1 : Macchina_Pronta
$STATE : 2 : Attrezzaggio
$STATE : 3 : Creazione_Programmi
$STATE : 4 : Lavori_Vari
$STATE : 5 : Guasto
$STATE : 6 : Manca_Pezzo
$STATE : 7 : Manca_Lavoro
$STATE : 8 : Assenteismo
$STATE : 9 : Manutenzione
$STATE : 10 : Pulizia
$STATE : 11 : Macchina_Spenta
$STATE : 12 : Fermo_Generico
$STATE : 13 : Lavorazione
$STATE : 14 : Cambio_Pezzo
$STATE : 15 : Allarme_CN
$STATE : 23 : Rottura_Nastro
$STATE : 24 : Manuale
$STATE : 25 : Scarico_Pieno
$STATE : 26 : Non_Disponibile
$STATE : 27 : Manca_Materia_Prima
$STATE : 28 : Magazzino_Grezzi_Vuoto
$STATE : 29 : Emergenza
$STATE : 30 : Fermo_Organizzativo
$STATE : 31 : Modifica_Programmi
$STATE : 32 : Sostituzione_Utensile
$STATE : 33 : Riempimento_Vasca
$STATE : 34 : Riscaldamento
$STATE : 35 : Anomalia_Macchina
$STATE : 49 : Manca_Attrezzatura
$STATE : 50 : Usura_Utensile
$STATE : 51 : Adeguamento_Attrezzature
$STATE : 52 : Formazione_Personale
#definizione eventi : obbligatorio iniziare da 0 --> select * from AnagraficaEventi
# NOTE
#
# BARCODE SOSTITUITI
#
# 4 NoBarcode_Riempimento_Vasca -> Barcode_Lavori_Vari (DONATI)
# 6 NoBarcode_Riscaldamento -> Barcode_Manca_Pezzo (DONATI)
# 15 HW_PowerOn -> HW_Power_On
# 26 Barcode_Manca_Riforn_MPD -> Barcode_Manca_Materia_Prima
# 29 HW_magazzino_grezzi vuoto POTREBBE ESSERE HW - mancanza materiale DA CAMBIARE
# 33 HW_Allarme Macchina -> HW_Allarme_Macchina
# 34 HW_End_Pallet_1 -> HW_Deposito_Robot
# 35 HW_End_Pallet_2 -> HW_Start_Tavola
# 36 HW_Deposito_Robot -> HW_End_Tavola
$EVENT : 00 : EMPTY
$EVENT : 01 : Barcode_Lavora
$EVENT : 02 : Barcode_Attrezzaggio
$EVENT : 03 : Barcode_Creazione_Programmi
$EVENT : 04 : Barcode_Lavori_Vari
$EVENT : 05 : Barcode_Guasto
$EVENT : 06 : Barcode_Manca_Pezzo
$EVENT : 07 : Barcode_Manca_Ciclo_Lavoro
$EVENT : 08 : Barcode_Assenteismo
$EVENT : 09 : Barcode_Manutenzione
$EVENT : 10 : Barcode_Pulizia
$EVENT : 12 : Barcode_Macchina_Spenta
$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_Fermo_Organizzativo
$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_Materia_Prima
$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 : 35 : HW_Start_Tavola
$EVENT : 36 : HW_End_Tavola
$EVENT : 37 : Barcode_Riempimento_Vasca
$EVENT : 38 : Barcode_Riscaldamento
$EVENT : 39 : Barcode_Anomalia_macchina
$EVENT : 49 : Barcode_Manca_Attrezzatura
$EVENT : 50 : Barcode_Usura_Utensile
$EVENT : 51 : Barcode_Adeguamento_Attrezzature
$EVENT : 52 : Barcode_Formazione_Personale
$RULES
# state : event : next state : Cod. Event
ALL_STATES : EMPTY : ND
ALL_STATES : Barcode_Lavora : Macchina_Pronta # 1
ALL_STATES : Barcode_Attrezzaggio : Attrezzaggio # 2
ALL_STATES : Barcode_Creazione_Programmi : Creazione_Programmi # 3
ALL_STATES : Barcode_Lavori_Vari : Lavori_Vari # 4
ALL_STATES : Barcode_Guasto : Guasto # 5
ALL_STATES : Barcode_Manca_Pezzo : Manca_Pezzo # 6
ALL_STATES : Barcode_Manca_Ciclo_Lavoro : Manca_Lavoro # 7
ALL_STATES : Barcode_Assenteismo : Assenteismo # 8
ALL_STATES : Barcode_Manutenzione : Manutenzione # 9
ALL_STATES : Barcode_Pulizia : Pulizia # 10
#ALL_STATES : Bcode_Cambio_Pallet : Cambio_Pezzo # 11 TOLTO perchè non dovrebbe mai essere usato da nessuno infatti nome sbagliato bcode
ALL_STATES : Barcode_Macchina_Spenta : Macchina_Spenta # 12
ALL_STATES : Barcode_Fermo_Organizzativo : Fermo_Organizzativo # 19
ALL_STATES : Barcode_Manca_Materia_Prima : Manca_Materia_Prima # 26
ALL_STATES : Barcode_Modifica_Programmi : Modifica_Programmi # 31
ALL_STATES : Barcode_Sostituzione_Utensile : Sostituzione_Utensile # 32
ALL_STATES : Barcode_Riempimento_Vasca : Riempimento_Vasca # 37
ALL_STATES : Barcode_Riscaldamento : Riscaldamento # 38
ALL_STATES : Barcode_Anomalia_Macchina : Anomalia_Macchina # 39
ALL_STATES : Barcode_Manca_Attrezzatura : Manca_Attrezzatura # 49
ALL_STATES : Barcode_Usura_Utensile : Usura_Utensile # 50
ALL_STATES : Barcode_Adeguamento_Attrezzature : Adeguamento_Attrezzature # 51
ALL_STATES : Barcode_Formazione_Personale : Formazione_Personale # 52
ALL_STATES : HW_power_off : Macchina_Spenta # 14
Macchina_Pronta : HW_Power_On : Fermo_Generico # 15
Macchina_Spenta : HW_Power_On : Fermo_Generico # 15
Lavorazione : HW_Power_On : Fermo_Generico # 15
Cambio_Pezzo : HW_Power_On : Fermo_Generico # 15
Allarme_CN : HW_Power_On : Fermo_Generico # 15
Rottura_Nastro : HW_Power_On : Fermo_Generico # 15
Manuale : HW_Power_On : Fermo_Generico # 15
Non_Disponibile : HW_Power_On : Fermo_Generico # 15
Riscaldamento : HW_Power_On : Fermo_Generico # 15
Macchina_Pronta : HW_Machining : Lavorazione # 16
Macchina_Spenta : HW_Machining : Lavorazione # 16
Fermo_Generico : HW_Machining : Lavorazione # 16
Cambio_Pezzo : HW_Machining : Lavorazione # 16
Allarme_CN : HW_Machining : Lavorazione # 16
Rottura_Nastro : HW_Machining : Lavorazione # 16
Manuale : HW_Machining : Lavorazione # 16
Scarico_Pieno : HW_Machining : Lavorazione # 16
Non_Disponibile : HW_Machining : Lavorazione # 16
Magazzino_Grezzi_Vuoto : HW_Machining : Lavorazione # 16
Emergenza : HW_Machining : Lavorazione # 16
Riscaldamento : HW_Machining : Lavorazione # 16
Macchina_Pronta : HW_End_Machining : Cambio_Pezzo # 17
Macchina_Spenta : HW_End_Machining : Cambio_Pezzo # 17
Fermo_Generico : HW_End_Machining : Cambio_Pezzo # 17
Lavorazione : HW_End_Machining : Cambio_Pezzo # 17
Allarme_CN : HW_End_Machining : Cambio_Pezzo # 17
Rottura_Nastro : HW_End_Machining : Cambio_Pezzo # 17
Manuale : HW_End_Machining : Cambio_Pezzo # 17
Scarico_Pieno : HW_End_Machining : Cambio_Pezzo # 17
Non_Disponibile : HW_End_Machining : Cambio_Pezzo # 17
Macchina_Pronta : HW_Error : Allarme_CN # 18
Macchina_Spenta : HW_Error : Allarme_CN # 18
Fermo_Generico : HW_Error : Allarme_CN # 18
Lavorazione : HW_Error : Allarme_CN # 18
Cambio_Pezzo : HW_Error : Allarme_CN # 18
Rottura_Nastro : HW_Error : Allarme_CN # 18
Manuale : HW_Error : Allarme_CN # 18
Scarico_Pieno : HW_Error : Allarme_CN # 18
Non_Disponibile : HW_Error : Allarme_CN # 18
Macchina_Pronta : Contapezzi : Cambio_Pezzo # 20
Macchina_Spenta : Contapezzi : Cambio_Pezzo # 20
Fermo_Generico : Contapezzi : Cambio_Pezzo # 20
Lavorazione : Contapezzi : Cambio_Pezzo # 20
Allarme_CN : Contapezzi : Cambio_Pezzo # 20
Rottura_Nastro : Contapezzi : Cambio_Pezzo # 20
Manuale : Contapezzi : Cambio_Pezzo # 20
Scarico_Pieno : Contapezzi : Cambio_Pezzo # 20
Non_Disponibile : Contapezzi : Cambio_Pezzo # 20
Macchina_Pronta : HW_Start_Pallet : Lavorazione # 21
Macchina_Spenta : HW_Start_Pallet : Lavorazione # 21
Fermo_Generico : HW_Start_Pallet : Lavorazione # 21
Cambio_Pezzo : HW_Start_Pallet : Lavorazione # 21
Allarme_CN : HW_Start_Pallet : Lavorazione # 21
Rottura_Nastro : HW_Start_Pallet : Lavorazione # 21
Manuale : HW_Start_Pallet : Lavorazione # 21
Scarico_Pieno : HW_Start_Pallet : Lavorazione # 21
Non_Disponibile : HW_Start_Pallet : Lavorazione # 21
Macchina_Pronta : HW_End_Pallet : Cambio_Pezzo # 22
Macchina_Spenta : HW_End_Pallet : Cambio_Pezzo # 22
Fermo_Generico : HW_End_Pallet : Cambio_Pezzo # 22
Lavorazione : HW_End_Pallet : Cambio_Pezzo # 22
Allarme_CN : HW_End_Pallet : Cambio_Pezzo # 22
Rottura_Nastro : HW_End_Pallet : Cambio_Pezzo # 22
Manuale : HW_End_Pallet : Cambio_Pezzo # 22
Scarico_Pieno : HW_End_Pallet : Cambio_Pezzo # 22
Non_Disponibile : HW_End_Pallet : Cambio_Pezzo # 22
Macchina_Pronta : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Macchina_Spenta : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Fermo_Generico : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Lavorazione : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Cambio_Pezzo : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Allarme_CN : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Manuale : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Scarico_Pieno : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Non_Disponibile : HW_Rottura_Nastro_Abrasivo : Rottura_Nastro # 23
Macchina_Pronta : HW_Manuale : Manuale # 24
Macchina_Spenta : HW_Manuale : Manuale # 24
Fermo_Generico : HW_Manuale : Manuale # 24
Lavorazione : HW_Manuale : Manuale # 24
Cambio_Pezzo : HW_Manuale : Manuale # 24
Allarme_CN : HW_Manuale : Manuale # 24
Rottura_Nastro : HW_Manuale : Manuale # 24
Scarico_Pieno : HW_Manuale : Manuale # 24
Non_Disponibile : HW_Manuale : Manuale # 24
Macchina_Pronta : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Macchina_Spenta : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Fermo_Generico : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Lavorazione : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Cambio_Pezzo : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Allarme_CN : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Rottura_Nastro : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Manuale : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Non_Disponibile : HW_Nastro_Scarico_Pieno : Scarico_Pieno # 25
Lavorazione : Timer_Timeout_Tempo_Ciclo : Fermo_Generico # 27
Macchina_Pronta : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Attrezzaggio : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Creazione_Programmi : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Lavori_Vari : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Guasto : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Pezzo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Lavoro : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Assenteismo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manutenzione : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Pulizia : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Fermo_Generico : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Lavorazione : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Cambio_Pezzo : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Allarme_CN : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Rottura_Nastro : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manuale : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Scarico_Pieno : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Materia_Prima : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Modifica_Programmi : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Sostituzione_Utensile : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Riempimento_Vasca : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Riscaldamento : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Anomalia_Macchina : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Manca_Attrezzatura : Timer_Timeout_Turno_By_Tempo_Ciclo : Non_Disponibile # 28
Macchina_Pronta : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Macchina_Spenta : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Fermo_Generico : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Lavorazione : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Cambio_Pezzo : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Allarme_CN : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Rottura_Nastro : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Manuale : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Scarico_Pieno : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Non_Disponibile : HW_Magazzino_Grezzi_Vuoto : Magazzino_Grezzi_Vuoto # 29
Macchina_Pronta : HW_Emergenza : Emergenza # 30
Macchina_Spenta : HW_Emergenza : Emergenza # 30
Fermo_Generico : HW_Emergenza : Emergenza # 30
Lavorazione : HW_Emergenza : Emergenza # 30
Cambio_Pezzo : HW_Emergenza : Emergenza # 30
Allarme_CN : HW_Emergenza : Emergenza # 30
Rottura_Nastro : HW_Emergenza : Emergenza # 30
Manuale : HW_Emergenza : Emergenza # 30
Scarico_Pieno : HW_Emergenza : Emergenza # 30
Non_Disponibile : HW_Emergenza : Emergenza # 30
Macchina_Pronta : HW_Allarme_Macchina : Allarme_CN # 33
Macchina_Spenta : HW_Allarme_Macchina : Allarme_CN # 33
Fermo_Generico : HW_Allarme_Macchina : Allarme_CN # 33
Lavorazione : HW_Allarme_Macchina : Allarme_CN # 33
Cambio_Pezzo : HW_Allarme_Macchina : Allarme_CN # 33
Rottura_Nastro : HW_Allarme_Macchina : Allarme_CN # 33
Manuale : HW_Allarme_Macchina : Allarme_CN # 33
Scarico_Pieno : HW_Allarme_Macchina : Allarme_CN # 33
Non_Disponibile : HW_Allarme_Macchina : Allarme_CN # 33
Macchina_Pronta : HW_Start_Tavola : Lavorazione # 35
Macchina_Spenta : HW_Start_Tavola : Lavorazione # 35
Fermo_Generico : HW_Start_Tavola : Lavorazione # 35
Cambio_Pezzo : HW_Start_Tavola : Lavorazione # 35
Allarme_CN : HW_Start_Tavola : Lavorazione # 35
Rottura_Nastro : HW_Start_Tavola : Lavorazione # 35
Manuale : HW_Start_Tavola : Lavorazione # 35
Scarico_Pieno : HW_Start_Tavola : Lavorazione # 35
Non_Disponibile : HW_Start_Tavola : Lavorazione # 35
Macchina_Pronta : HW_End_Tavola : Cambio_Pezzo # 36
Macchina_Spenta : HW_End_Tavola : Cambio_Pezzo # 36
Fermo_Generico : HW_End_Tavola : Cambio_Pezzo # 36
Lavorazione : HW_End_Tavola : Cambio_Pezzo # 36
Allarme_CN : HW_End_Tavola : Cambio_Pezzo # 36
Rottura_Nastro : HW_End_Tavola : Cambio_Pezzo # 36
Manuale : HW_End_Tavola : Cambio_Pezzo # 36
Scarico_Pieno : HW_End_Tavola : Cambio_Pezzo # 36
Non_Disponibile : HW_End_Tavola : Cambio_Pezzo # 36
# -------------------------------------------------------------------------------------------------
$DO
+33
View File
@@ -0,0 +1,33 @@
Tutte le macchine erano sulla famiglia 11. Verificata corrispondenza con la Famiglia 11 Donati Basi ( vedi 11_FAMIGLIA_Donati-NEW_Original.rul in questa cartella) era tutto corretta a parte
il riscaldamento dove per LVF, a differenza di Donati, non usciva con eventi 15 ( Power on) e 16 (Machining).
Verificato con Samuele si è deciso che andava bene la versione di Donati quindi caricata quella dopo aggiornamento con i nuovi barcode.
Gli Stati e gli Eventi erano diversi per alcuni barcode, alcuni già spostati per altri clienti e altri nuovi quindi li ho creati ex novo sia stati che eventi barcode
CARICATA QUINDI RUL di DONATI 11_FAMIGLIA_Donati-NEW.rul aggiornata al 18.07.2024
STATI
4 Attesa Attrezzista -> 54
6 Pausa Pranzo -> 55
9 Manutenzione Straordinaria -> New 61
10 Manutenzione Ordinaria -> New 62
32 Rottura Utensile -> 59
33 Manca Operatore -> 56
34 Problemi di Lavorazione -> New 63
EVENTI
Come Stati tranne per
Barcode Pausa Pranzo 37 -> 56
Barcode Problemi di Lavorazione 38 -> 63
Aggiunti a file master e al file Famigli Barcode e poi a famigli 11 Donati dopo aver aggiunto anche quelli già creati in precedenza non ancora inseriti