Example #1
0
        public bool SetTemp(byte index, float temp)
        {
            int temp_tem = (int)(temp * 10);
            var Couv     = this.CouMixer.Couveuses[index];

            return(CanComm.SetRegister(Couv.SetupTemp.Addr, temp_tem, true));
        }
Example #2
0
 private void SetHightSpeed(Object obj)
 {
     if (obj is Common.Models.Communication.Unit.Electromotor motor)
     {
         CanComm.SetRegister(motor.Speed.Addr, motor.Speed.SetValue);
     }
     //Common.Models.Communication.Unit.Electromotor
 }
Example #3
0
        /// <summary>
        /// 光藕感应,检测Gel卡是否存在
        /// </summary>
        /// <param name="coilCount"></param>
        /// <param name="regCount"></param>
        /// <param name="addr"></param>
        /// <returns></returns>
        /// <summary>
        /// 开关报警
        /// </summary>
        /// <param name="IsOn">true:响警 false:关警</param>
        public bool Alarm(bool IsOn)
        {
            var result = true;

            if (IsOn)
            {
                result = CanComm.SetRegister(OP.LightAlarmCoil.Addr, 0xffffff);
                //= result&& this.PcbComm.SetRegister(OP.LightAlarmCoil.Addr,ByteUtil.BytesToInt16(0xFF,0xFF));
            }
            else
            {
                result = CanComm.SetRegister(OP.LightAlarmCoil.Addr, 0x000000);
                // result = result && this.PcbComm.SetRegister(OP.LightAlarmCoil.Addr,(short)0);
            }
            //result &&this.Comm.SetCoil(IsOn, OP.VoiceAlarmCoil.Addr);
            return(result);
        }