using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace AutoShutDown
{
public partial class Form1 : Form
{
SerialPort plc = new SerialPort("COM2", 9600, Parity.Odd, 8, StopBits.One);
public Form1()
{
InitializeComponent();
}
{
plc.DataReceived += new SerialDataReceivedEventHandler(plc_DataReceived);

本文介绍了如何通过串口发送特定指令来远程控制工控机执行自动关机操作,详细阐述了串口通信的基础知识以及实现这一功能的步骤和技术要点。
最低0.47元/天 解锁文章
1718

被折叠的 条评论
为什么被折叠?



