Example #1
0
        /// <summary>
        /// 获取单点 输入信号
        /// </summary>
        /// <param name="card"></param>
        /// <param name="ioBit">0开始, 0-15</param>
        /// <param name="bStatus"></param>
        /// <returns></returns>
        public short _SR_GetInputBit(short card, short ioBit, out bool bStatus)
        {
            int IOBool = Dmc1000.d1000_in_bit(ioBit + card * 32);

            bStatus = false;
            if (IOBool == 1)
            {
                bStatus = true;
            }

            return(0);
        }
Example #2
0
        /// <summary>
        /// 获取单点 输入信号
        /// </summary>
        /// <param name="card"></param>
        /// <param name="ioBit">0开始, 0-15</param>
        /// <param name="bStatus"></param>
        /// <returns></returns>
        public short _SR_GetInputBit(short card, short ioBit, out bool bStatus)
        {
            bStatus = false;
            if (tag_CardCount < 1 || card >= tag_CardCount)
            {
                return(-1);
            }
            int IOBool = Dmc1000.d1000_in_bit(ioBit + card * 32);

            if (IOBool == 1)
            {
                bStatus = true;
            }

            return(0);
        }