Esempio n. 1
0
        void TaskGetThickness()
        {
            int len, pos = 0;

            _aio.GetAiSamplingCount(_aioId, out len);
            if (len > 0)
            {
                var buf = new float[len * 14];
                _aio.GetAiSamplingDataEx(_aioId, ref len, ref buf);
                while (len-- > 0)
                {
                    ThicknessData[] tmps = new ThicknessData[7];
                    for (int i = 0; i < 7; i++)
                    {
                        tmps[i] = new ThicknessData(buf[pos++], buf[pos++]);
                    }
                    if (!isDebug)
                    {
                        ThicknessQue.Enqueue(tmps);
                    }
                    else
                    {
                        DebugQue.Enqueue(tmps);
                    }

                    if (len == 0)
                    {
                        NowThicknessData = tmps;
                    }
                }
            }
        }
Esempio n. 2
0
        //状態取得
        private void devMemoryTimer_Tick(object sender, EventArgs e)
        {
            int aiStatus      = 0;
            int samplingCount = 0;

            aio.GetAiStatus(devId, out aiStatus);
            aio.GetAiSamplingCount(devId, out samplingCount);
            devStLabel.Text = aiStatus.ToString() + " + " + samplingCount.ToString();
        }