Beispiel #1
0
        public Core(FrameGrabberManager frameGrab, PlcMacchinaManager plc, int rotazione, IOManager mIOManager, int numOutBusy, int numOutRis)
        {
            try
            {
                this.plcMacchina = plc;
                this.mIOManager  = mIOManager;
                this.numOutRis   = numOutRis;
                this.numOutBusy  = numOutBusy;

                this.IsRunning = false;

                this.frameGrabberForThisObject = new FrameGrabberManager[1];
                this.frameGrabberLock          = new object[1] {
                    new object()
                };
                this.imgGrab   = new HImage[1];
                this.rotazione = new int[1];

                this.frameGrabberForThisObject[0] = frameGrab;
                this.rotazione[0] = rotazione;
            }
            catch (Exception)
            {
                throw;
            }
            cancelToken = new CancellationTokenSource();
            cancelToken.Cancel();//Ho bisogno di allocarlo ma non voglio partire bloccato
        }
Beispiel #2
0
        public Core(FrameGrabberManager[] frameGrab, PlcMacchinaManager plc, int[] rotazione, IOManager mIOManager, int numOutBusy, int numOutRis)
        {
            try
            {
                this.plcMacchina = plc;
                this.mIOManager  = mIOManager;
                this.numOutRis   = numOutRis;
                this.numOutBusy  = numOutBusy;

                this.IsRunning = false;

                this.frameGrabberForThisObject = new FrameGrabberManager[frameGrab.Length];
                this.frameGrabberLock          = new object[frameGrab.Length];
                this.imgGrab   = new HImage[frameGrab.Length];
                this.rotazione = new int[frameGrab.Length];

                for (int i = 0; i < frameGrab.Length; i++)
                {
                    this.frameGrabberLock[i] = new object();

                    this.frameGrabberForThisObject[i] = frameGrab[i];
                    this.rotazione[i] = rotazione[i];
                }
            }
            catch (Exception)
            {
                throw;
            }
            cancelToken = new CancellationTokenSource();
            cancelToken.Cancel();//Ho bisogno di allocarlo ma non voglio partire bloccato
        }
        public FormAllarmePLC(Class.PlcMacchinaManager plcMacchinaManager, bool allarmeLicenza, DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.plcMacchinaManager = plcMacchinaManager;
            this.linguaMngr         = linguaMngr;

            this.allarmeLicenza = allarmeLicenza;

            PopolaSchermataErrore(plcMacchinaManager, linguaMngr);
        }
        public FormDatiDiProduzione(Class.PlcMacchinaManager plcMacchina, DataType.Contatori contatori, DBL.LinguaManager linguaMngr)
        {
            InitializeComponent();

            this.plcMacchina = plcMacchina;
            this.contatori   = contatori;
            this.linguaMngr  = linguaMngr;

            AdjustCulture();
            // |MP 5-2-19  gestione dei campi da visualizzare in funzione di cosa deve fare la macchina
            showCampiTappo();
            showCampiLivello();
        }
        private void PopolaSchermataErrore(Class.PlcMacchinaManager plcMacchinaManager, DBL.LinguaManager linguaMngr)
        {
            txtDescrizioneErrore.Text = string.Empty;

            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.EMERGENZA_PREMUTA, linguaMngr.GetTranslation("ALLARME_EMERGENZA_PREMUTA"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.RAGGIUNTO_NUMERO_DI_SCARTI_CONSECUTIVI, linguaMngr.GetTranslation("ALLARME_RAGGIUNTO_NUMERO_DI_SCARTI_CONSECUTIVI"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.AVARIA_BATTERIE_UPS, linguaMngr.GetTranslation("ALLARME_AVARIA_BATTERIE_UPS"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.AVARIA_TENSIONE_UPS, linguaMngr.GetTranslation("ALLARME_AVARIA_TENSIONE_UPS"));
            GestioneVisualizzazioneErrore(Class.PlcMacchinaManager.Allarmi.DISALLINEAMENTO, linguaMngr.GetTranslation("ALLARME_DISALLINEAMENTO"));

            if (this.allarmeLicenza)
            {
                txtDescrizioneErrore.Text = string.Format("{0}{1}\n\r\n\r", txtDescrizioneErrore.Text, "H_ERR_WDBID	 4057	 Image data management: object-ID outside the valid range");
            }
        }
Beispiel #6
0
        public FormMenuHome(Class.Core[] core, Class.PlcMacchinaManager plcMacchina, Class.PasswordManager pwdManager, DBL.LinguaManager linguaMngr, object repaintLock)
        {
            InitializeComponent();

            this.core        = core;
            this.plcMacchina = plcMacchina;
            this.pwdManager  = pwdManager;
            this.linguaMngr  = linguaMngr;
            this.repaintLock = repaintLock;

            AdjustCulture();

            if (!Properties.Settings.Default.UsaPassword)
            {
                this.Width         -= btnPassword.Width;
                btnPassword.Visible = false;
            }
        }
Beispiel #7
0
        public FormGestioneFormati(Class.Core[] core, Class.PlcMacchinaManager plcMacchina, int id_formato, DBL.LinguaManager linguaMngr, object repaintLock)
        {
            InitializeComponent();

            this.core        = core;
            this.plcMacchina = plcMacchina;
            this.id_formato  = id_formato;
            this.linguaMngr  = linguaMngr;
            this.repaintLock = repaintLock;

            AdjustCulture();

            DBL.FormatoManager dbmFormati = new DBL.FormatoManager(Properties.Settings.Default.ConnectionStringFormati);

            string descrizioneFormato = dbmFormati.GetDescrizioneFormato(id_formato);

            lblRicettaCorrente.Text = string.Format(linguaMngr.GetTranslation("LBL_RICETTA_CORRENTE"), descrizioneFormato);

            GestioneControlliLivello();
        }