private void setBscanCofig() { double BGateDelay = 0; double BGateRange = 0; bscanCofig.AscanIndex = (int)ascanIndex; bscanCofig.ScanAxisIndex = cmbScanAxis.SelectedIndex; GetGateDAQ.Delay(0, 0, GateType.B, ref BGateDelay); GetGateDAQ.Width(0, 0, GateType.B, ref BGateRange); bscanCofig.HorizontalAxisMin = BGateDelay; bscanCofig.HorizontalAxisMax = BGateDelay + BGateRange; bscanCofig.VerticalAxisMin = 0; bscanCofig.VerticalAxisMax = Convert.ToDouble(txtScanLength.Text); bscanCofig.Range = BGateRange; bscanCofig.Resolution = Convert.ToDouble(txtResolution.Text); bscanCofig.ScanLength = Convert.ToDouble(txtScanLength.Text); bscanCofig.IsSetOk = true; bscanCofig.FileName = pathTxtBox.Text; bscanCofig.IsSave = checkBox.Checked; }
public double add(GatePacket gatePacket, int boardIndex) { if (stripSeries == null) { return(0); } if (delay == -1 || delay == 0 || range == -1 || range == 0) { int port; int userIndex = SessionHardWare.getUserIndex(assignName); SessionInfo info = SessionHardWare.getSessionAttr(userIndex); //SessionHardWare.getInfo(assignName, out port); GetGateDAQ.Delay((uint)info.sessionIndex, (uint)info.port, GateType.B, ref delay); GetGateDAQ.Width((uint)info.sessionIndex, (uint)info.port, GateType.B, ref range); } double max = stripSeries.add(gatePacket, boardIndex, delay, range); return(max); }
public void setAscanAxis(TChart tChart, int selectGate) { int error_code; AscanWaveDectionMode mode = AscanWaveDectionMode.Rf; double gateDelay = 0; double gateRange = 0; error_code = GetAsacnVideoDAQ.DetectionWaveMode(0, 0, ref mode); if (error_code != 0) { return; } switch (mode) { case AscanWaveDectionMode.Rf: tChart.Axes.Bottom.SetMinMax(-1, 1); break; case AscanWaveDectionMode.Full: case AscanWaveDectionMode.SemiNegtive: case AscanWaveDectionMode.SemiPositve: tChart.Axes.Bottom.SetMinMax(0, 1); break; default: error_code = -1; MessageShow.show("Initial Ascan teeChart axe failed!", "初始化A扫描画图坐标轴失败!"); break; } GetGateDAQ.Delay(0, 0, (GateType)selectGate, ref gateDelay); GetGateDAQ.Width(0, 0, (GateType)selectGate, ref gateRange); this.gateDelay = gateDelay; this.gateRange = gateRange; tChart.Axes.Left.SetMinMax(gateDelay, gateDelay + gateRange); }