using IND245; static void Main(string[] args) { string PORTNAME = "COM3"; int BAUDRATE = 9600; int TESTNUM = 3; double weight = 0; string weightUnit = string.Empty; ind245 i245 = new ind245(); //打开 if (i245.SerialOpen(PORTNAME, BAUDRATE).Equals(0)) { //读取 while (TESTNUM-- > 0) { weight = i245.SerialRead(out weightUnit); Console.WriteLine("getData:" + weight); Thread.Sleep(1000); } } //关闭 i245.SerialClose(); Console.WriteLine("funtion end"); Console.ReadKey(); } PS:地秤,挂称通用
2021-08-30 11:03:02 7KB 托利多 电子称重 ind245协议
1