banboshi_V1/halftoneproject-master/Code/Device/Relaxometer.cs
2023-10-31 13:19:29 +08:00

46 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Advantech.Motion;
using Newtonsoft.Json;
using ProductionControl.UI;
using static ProductionControl.UI.UIAxis;
namespace ProductionControl.Device
{
public class Relaxometer
{
//public int readData(string comNum,int baudRate=2400)
//{
// // Open Com
// SerialPort _serialPort = new SerialPort(comNum, baudRate);
// if (_serialPort.IsOpen)
// _serialPort.Close();
// // Set the read / write timeouts
// _serialPort.ReadTimeout = 500;
// _serialPort.WriteTimeout = 500;
// // Set read / write buffer Sizethe default of value is 1MB
// _serialPort.ReadBufferSize = 128 * 128;
// _serialPort.WriteBufferSize = 128 * 128;
// _serialPort.Open();
// // Discard Buffer
// _serialPort.DiscardInBuffer();
// _serialPort.DiscardOutBuffer();
//}
[Browsable(true), Category("布局"), Description(" int test")]
public int testArr1 { get; private set; }
//[NonSerialized]
[Browsable(true), Category("布局"), Description(" int test"), ReadOnly(true)]
public int testArr2 { get; set; }
public string strArr1 { get; set; }
}
}