Example #1
0
        //=================================================================================================================
        /// <summary>
        /// ctor 
        /// </summary>
        /// <param name="daqDevice">The DaqDevice object that creates this component</param>
        /// <param name="deviceInfo">The DeviceInfo oject passed down to the driver interface</param>
        //=================================================================================================================
        public Usb2001TcAi(DaqDevice daqDevice, DeviceInfo deviceInfo)
            : base(daqDevice, deviceInfo, 1)
        {
            // default is scale data...
            m_scaleData = true;

                // create thermocouple types...
            m_tcTypes = new ThermocoupleTypes[m_maxChannels];

            m_thermocouples = new Thermocouple[m_maxChannels];

                // create an array for CJC values
            m_cjcValues = new double[m_maxChannels];

                // create an array of channel types...
            m_aiChannelType[0] = AiChannelTypes.Temperature;

                // get the tc type...
            m_tcTypes[0] = GetTcType(0);

            if (m_tcTypes[0] != ThermocoupleTypes.NotSet)
            {
                    // create the thermocouple object...
                m_thermocouples[0] = Thermocouple.CreateThermocouple(m_tcTypes[0]);
            }
        }
Example #2
0
        //=================================================================================================================
        /// <summary>
        /// ctor 
        /// </summary>
        /// <param name="daqDevice">The DaqDevice object that creates this component</param>
        /// <param name="deviceInfo">The DeviceInfo oject passed down to the driver interface</param>
        //=================================================================================================================
        internal Usb2408xAi(DaqDevice daqDevice, DeviceInfo deviceInfo)
            : base(daqDevice, deviceInfo, 16)
        {
            // default is scale data...
            m_scaleData = true;

                // create thermocouple types...
            m_tcTypes = new ThermocoupleTypes[m_maxChannels / 2];

            m_thermocouples = new Thermocouple[m_maxChannels / 2];

                // create an array for CJC values
            m_cjcValues = new double[m_maxChannels / 2];

                // create channel types...
            for (int i = 0; i < m_maxChannels; i++)
            {
                m_aiChannelType[i] = GetChannelType(i);
            }

                // create thermocouple objects...
            for (int i = 0; i < (m_maxChannels / 2); i++)
            {
                m_tcTypes[i] = GetTcType(i);

                if (m_tcTypes[i] != ThermocoupleTypes.NotSet)
                {
                    m_thermocouples[i] = Thermocouple.CreateThermocouple(m_tcTypes[i]);
                }
            }

            // create channel mappings
            m_channelMappings.Add(0, 8);
            m_channelMappings.Add(1, 9);
            m_channelMappings.Add(2, 10);
            m_channelMappings.Add(3, 11);
            m_channelMappings.Add(4, 12);
            m_channelMappings.Add(5, 13);
            m_channelMappings.Add(6, 14);
            m_channelMappings.Add(7, 15);
        }