码迷,mamicode.com
首页 >  
搜索关键字:serialport    ( 119个结果
记一次 webpack.config.js 的 scss 加载问题的解决方案以及事情分析
在迁移 vue element admin 到 electron vue serialport 的时候,发现了一次有趣的分析。 报错如下 一开始没有细看,以为是大众常见问题,但后来仔细分析了一下,它其实就是要你把 scss 文件添加到工程下。 那么怎么做呢? 搜索两边的工程发现 vue elemen ...
分类:Web程序   时间:2020-02-08 00:19:01    阅读次数:97
serialport DataReceived事件
serialport DataReceived事件, 默认是收到一个byte就触发事件. lock (thisLock) { int len = sp.BytesToRead; if (len > 0) { Byte[] data = new Byte[len]; try { sp.Read(dat ...
分类:其他好文   时间:2020-02-06 14:44:57    阅读次数:119
RS323串口连接仪器,接收仪器信息
SerialPort sp1 = new SerialPort(); getBloodPressur(); public void getBloodPressur() { try { string[] str = SerialPort.GetPortNames(); if (str == null) ...
分类:其他好文   时间:2020-01-17 13:42:36    阅读次数:105
C# SerialPort 读写三菱FX系列PLC
1:串口初始化 com = new SerialPort("COM3", 9600, Parity.Even, 7, StopBits.One); 2:打开关闭串口 1 if (com.IsOpen) 2 { 3 com.Close();//关闭 4 } 5 6 com.Open();//打开 3: ...
分类:Windows程序   时间:2020-01-09 13:30:20    阅读次数:132
C# 串口关闭时主界面卡死原因分析
原文:C# 串口关闭时主界面卡死原因分析 问题描述 前几天用SerialPort类写一个串口的测试程序,关闭串口的时候会让界面卡死。 参考博客windows程序界面卡死的原因,得出界面卡死原因:主线程和其他的线程由于资源或者锁争夺,出现了死锁。 参考知乎文章WinForm界面假死,如何判断其卡在代码... ...
分类:Windows程序   时间:2019-12-27 00:10:38    阅读次数:186
wpf上位机中串口和usb通信
串口通信 主要是端口,遍历端口进行,波特率 string[] portNames = SerialPort.GetPortNames(); int i = 0; for (i = 0; i < portNames.Length; i++) { if (GlobalVariable.isSet == ...
分类:Windows程序   时间:2019-10-10 11:31:47    阅读次数:137
C#:蓝牙串口读数据和写数据
原文:C#:蓝牙串口读数据和写数据 首次使用C#编写与COM口有关的程序,期间遇到了很多问题,写下自己的经验总结,如有错漏,欢迎批评指正! 1、新建一个串口类(nbsp;SerialPort类) 1 //Create a serial port for bluetooth 2 SerialPort ... ...
分类:Windows程序   时间:2019-07-20 09:34:15    阅读次数:158
c# 循环com,分别对串口写入与读取,获取需要的串口信息
private SerialPort serialPort;//串口对象类 private string strPortDataReceived = "";//记录串口返回值 private string serialPortName = "";//记录端口号 private bool isGet ... ...
分类:Windows程序   时间:2019-03-15 19:17:58    阅读次数:192
Node.js 串口通讯 node-serialport
安装:npm install serialport 使用: 要发送byte数组把发送的'main screen turn on'改为[0x01,0x02]之类的byte数组注:版本不同可能使用方式不同,当前使用的版本是7.1.4官方文档4.0.1地址:https://github.com/node- ...
分类:Web程序   时间:2019-02-10 00:02:47    阅读次数:932
C#仪器串口自动重连操作
private bool AutoConnectTimer() { int pBurante = 115200; string[] ports = SerialPort.GetPortNames(); foreach (string itemprot in ports) { if (ConnectC ...
分类:Windows程序   时间:2019-01-19 15:19:16    阅读次数:347
119条   上一页 1 2 3 4 ... 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!