Ejemplo n.º 1
0
        public ComDataPLC(FunPLC_enum funPLC_e, string reg, int num, string nameFun, int[] value)
        {
            try
            {
                FunPLC_e = funPLC_e;
                Reg      = reg;
                Num      = num.ToString();
                NameFun  = nameFun;

                Time = DateTime.Now.Hour.ToString() + "-" + DateTime.Now.Minute.ToString() + "-" + DateTime.Now.Second.ToString() + "-" + DateTime.Now.Millisecond.ToString();

                if (value == null)
                {
                    Value = "";
                    return;
                }
                for (int i = 0; i < value.Length; i++)
                {
                    Value += value[i].ToString() + ",";
                }
            }
            catch (Exception ex)
            {
                Log.L_I.WriteError(NameClass, ex);
            }
        }
Ejemplo n.º 2
0
        public ComDataPLC(FunPLC_enum funPLC_e, string reg, int num, string nameFun, int value)
        {
            try
            {
                FunPLC_e = funPLC_e;
                Reg      = reg;
                Num      = num.ToString();
                NameFun  = nameFun;

                Time  = DateTime.Now.Hour.ToString() + "-" + DateTime.Now.Minute.ToString() + "-" + DateTime.Now.Second.ToString() + "-" + DateTime.Now.Millisecond.ToString();
                Value = value.ToString();
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 3
0
        public ComDataPLC(FunPLC_enum funPLC_e, string reg, int num, string nameFun, int[] value)
        {
            try
            {
                FunPLC_e = funPLC_e;
                Reg      = reg;
                Num      = num.ToString();
                NameFun  = nameFun;

                Time = DateTime.Now.Hour.ToString() + "-" + DateTime.Now.Minute.ToString() + "-" + DateTime.Now.Second.ToString() + "-" + DateTime.Now.Millisecond.ToString();
                for (int i = 0; i < value.Length; i++)
                {
                    Value += value[i].ToString() + ",";
                }
            }
            catch (Exception ex)
            {
            }
        }