Beispiel #1
0
        private void initImpedanceMatch()
        {
            int           error_code;
            uint          dampingValue  = 0;
            DampingActive dampingActive = DampingActive.OFF;

            error_code = GetRecieverDAQ.DampingActive(SelectAscan.sessionIndex, SelectAscan.port, ref dampingActive);
            if (error_code != 0)
            {
                return;
            }

            error_code = GetRecieverDAQ.DampingValue(SelectAscan.sessionIndex, SelectAscan.port, ref dampingValue);
            if (error_code != 0)
            {
                return;
            }

            switch (dampingActive)
            {
            case DampingActive.OFF:
                textBoxImpedance.Enabled  = false;
                chkImpedanceMatch.Checked = false;
                break;

            case DampingActive.ON:
                textBoxImpedance.Enabled  = true;
                chkImpedanceMatch.Checked = true;
                break;

            default:
                MessageShow.show("Error:Initial impedance match failed!",
                                 "错误:初始化匹配阻抗失败!");
                break;
            }

            textBoxImpedance.Text = dampingValue.ToString();
        }