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; } } } }
protected override void WndProc(ref Message m) { if (m.Msg == (int)CaioConst.AIOM_AIE_DATA_NUM) { //System.Diagnostics.Trace.WriteLine("メッセ" + m.LParam.ToString()); int convTimes = 1000; float[] aioVoltData = new float[convTimes * 2]; convertCount += (int)m.LParam; convTime.Text = convertCount.ToString(); aio.GetAiSamplingDataEx(devId, ref convTimes, ref aioVoltData); //System.Diagnostics.Trace.WriteLine("配列戻り" + convTimes.ToString()); //dataProc.listConv(aioVoltData, ref xyVoltListPkt); dataProc.listConv(aioVoltData, ref xyVoltList); } else if (m.Msg == (int)CaioConst.AIOM_AIE_OFERR) { statusMsg(1, "メモリがオーバーフローしました。"); } else if (m.Msg == (int)CaioConst.AIOM_AIE_SCERR) { statusMsg(1, "サンプリングクロックエラー"); } else if (m.Msg == (int)CaioConst.AIOM_AIE_ADERR) { statusMsg(1, "AD変換エラーです"); } base.WndProc(ref m); }