public Form1() { InitializeComponent(); textbox_frequency.Text = "10"; textbox_hsport.Text = "9003"; textbox_ipaddress1.Text = "192"; textbox_ipaddress2.Text = "168"; textbox_ipaddress3.Text = "1"; textbox_ipaddress4.Text = "1"; textbox_stprofile.Text = "2"; textbox_ipaddress1.GotFocus += OnFocusIPAddress1; textbox_ipaddress1.LostFocus += OnLostFocusIPAddress1; textbox_ipaddress2.GotFocus += OnFocusIPAddress1; textbox_ipaddress2.LostFocus += OnLostFocusIPAddress1; textbox_ipaddress3.GotFocus += OnFocusIPAddress1; textbox_ipaddress3.LostFocus += OnLostFocusIPAddress1; textbox_ipaddress4.GotFocus += OnFocusIPAddress1; textbox_ipaddress4.LostFocus += OnLostFocusIPAddress1; textbox_hsport.GotFocus += OnFocusIPAddress1; textbox_hsport.LostFocus += OnLostFocusIPAddress1; textbox_frequency.GotFocus += OnFocusIPAddress1; textbox_frequency.LostFocus += OnLostFocusIPAddress1; textbox_stprofile.GotFocus += OnFocusIPAddress1; textbox_stprofile.LostFocus += OnLostFocusIPAddress1; _callback = new HighSpeedDataCallBack(ReceiveHighSpeedData); }
private void ParameterRefresh() { _sendCommand = SendCommand.None; _deviceData = new DeviceData[NativeMethods.DeviceCount]; _callback = new HighSpeedDataCallBack(ReceiveHighSpeedData); for (int i = 0; i < NativeMethods.DeviceCount; i++) { _deviceData[i] = new DeviceData(); } _profileInfo = new LJV7IF_PROFILE_INFO[NativeMethods.DeviceCount]; currentBatch = new BatchData(); CPGap = new CalculationParameter(0, 2, 10); CPSeam = new CalculationParameter(0, 2, 10); }
private HighSpeedDataCallBack _callback; //回调 public SSZNAcquisition() { Form = new FormSSZNAcquisitio(this); var outputImage = new ToolOutput("输出图片", this.Name) { Item = new HObject() }; Output.Add(outputImage); _heightData = new int[15000 * 6400]; for (var i = 0; i < _heightData.Length; i++) { _heightData[i] = -1000000; } _callback = ReceiveHighSpeedData; }
/// <summary> /// Constructor /// </summary> public MainForm() { InitializeComponent(); // Field initialization _sendCommand = SendCommand.None; _deviceData = new DeviceData[NativeMethods.DeviceCount]; _measureDatas = new List<MeasureData>(); _callback = new HighSpeedDataCallBack(ReceiveHighSpeedData); _callbackOnlyCount = new HighSpeedDataCallBack(CountProfileReceive); _deviceStatusLabels= new Label[] { _lblDeviceStatus0, _lblDeviceStatus1, _lblDeviceStatus2, _lblDeviceStatus3, _lblDeviceStatus4, _lblDeviceStatus5}; _receivedProfileCountLabels = new Label[] { _lblReceiveProfileCount0, _lblReceiveProfileCount1, _lblReceiveProfileCount2, _lblReceiveProfileCount3, _lblReceiveProfileCount4, _lblReceiveProfileCount5}; for (int i = 0; i < NativeMethods.DeviceCount; i++) { _deviceData[i] = new DeviceData(); _deviceStatusLabels[i].Text = _deviceData[i].GetStatusString(); } _profileInfo = new LJV7IF_PROFILE_INFO[NativeMethods.DeviceCount]; // Communication button comment setting SetCommandBtnString(); // Control initialization _cmbMeasureX.DataSource = GetMeasureRangeList(); _cmbReceivedBinning.DataSource = GetReceivedBiginning(); _cmbCompressX.DataSource = GetCompressX(); _cmbMeasureX.SelectedValue = Define.MEASURE_RANGE_FULL; _cmbReceivedBinning.SelectedValue = Define.RECEIVED_BINNING_OFF; _cmbCompressX.SelectedValue = Define.COMPRESS_X_OFF; _cbxSelectProgram.SelectedIndex = 2; // For use in profile export control //_txtboxProfileFilePath.Text = Directory.GetCurrentDirectory() + @"\" + Define.DEFAULT_PROFILE_FILE_NAME; //_txtboxProfileFilePath.SelectionStart = _txtboxProfileFilePath.Text.Length; }
public LJController(ProbeSetup probeSetup, MeasurementUnit outputUnit, CancellationTokenSource cancellation) { _currentDeviceId = 0; _cancellation = cancellation; _probeSetup = probeSetup; _outputUnit = outputUnit; _scalingMultiplier = 5e-7;// outputUnit.ConversionFactor * Define.PROFILE_UNIT_MM; var _batchModeParms = new byte[8] { (byte)SettingDepth.Running, (byte)SettingType.Program00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00 }; _deviceData = new DeviceData(); _measureDatas = new List <MeasureData>(); _callback = new HighSpeedDataCallBack(ReceiveHighSpeedData); _timerHighSpeed = new System.Timers.Timer(100.0); _timerHighSpeed.AutoReset = true; _timerHighSpeed.Elapsed += new System.Timers.ElapsedEventHandler(_timerHighSpeed_Elapsed); _profileInfo = new LJV7IF_PROFILE_INFO(); }
internal static extern int LJV7IF_HighSpeedDataUsbCommunicationInitalize(int lDeviceId, HighSpeedDataCallBack pCallBack, uint dwProfileCnt, uint dwThreadId);
internal static extern int LJV7IF_HighSpeedDataEthernetCommunicationInitalize( int lDeviceId, ref LJV7IF_ETHERNET_CONFIG pEthernetConfig, ushort wHighSpeedPortNo, HighSpeedDataCallBack pCallBack, uint dwProfileCnt, uint dwThreadId);