資源簡介
·c#與485MODBUS串口通信源代碼,通過串口讀取設(shè)備數(shù)據(jù),c#的源代碼,比如讀取PLC數(shù)據(jù)(AD采集的或設(shè)置的),可以控制PLC(支持MODBUS)動作,485通信可以達(dá)到500M(穩(wěn)定通信),也可和單片機(jī)通信
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?System.IO.Ports;
using?System.Threading;
using?System.Net;
using?System.Net.Sockets;
using?System.Text.Regularexpressions;
namespace?COMTool
{
????
????public?partial?class?SetCOMtool?:?Form
????{
????????public?int?PortNum;
????????public?int?BaudRate;
????????public?byte?ByteSize;
????????public?byte?BParity;?//?0-4=nooddevenmarkspace???
????????/*
?????????*?1.?even?每個字節(jié)傳送整個過程中bit為1的個數(shù)是偶數(shù)個(校驗(yàn)位調(diào)整個數(shù))
?????????*?2.?odd?每個字節(jié)穿送整個過程中bit為1的個數(shù)是奇數(shù)個(校驗(yàn)位調(diào)整個數(shù))
?????????*?3.?noparity沒有校驗(yàn)位
?????????*?4.?space?校驗(yàn)位總為0
?????????*?5.?mark?校驗(yàn)位總為1
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????187??2016-10-12?14:13??comtest1\comtest1\App.config
?????文件????????187??2016-10-12?14:13??comtest1\comtest1\bin\Debug\comtest1.vshost.exe.config
?????文件????????490??2013-03-18?17:00??comtest1\comtest1\bin\Debug\comtest1.vshost.exe.manifest
?????文件??????27136??2017-05-10?13:49??comtest1\comtest1\bin\Debug\LLBGprsTool.exe
?????文件????????187??2016-10-12?14:13??comtest1\comtest1\bin\Debug\LLBGprsTool.exe.config
?????文件??????32256??2017-05-10?13:49??comtest1\comtest1\bin\Debug\LLBGprsTool.pdb
?????文件??????22696??2017-05-10?13:52??comtest1\comtest1\bin\Debug\LLBGprsTool.vshost.exe
?????文件????????187??2016-10-12?14:13??comtest1\comtest1\bin\Debug\LLBGprsTool.vshost.exe.config
?????文件??????24224??2016-10-18?12:59??comtest1\comtest1\bin\Release\comtest1.vshost.exe
?????文件????????187??2016-10-12?14:13??comtest1\comtest1\bin\Release\comtest1.vshost.exe.config
?????文件????????490??2013-03-18?17:00??comtest1\comtest1\bin\Release\comtest1.vshost.exe.manifest
?????文件??????26624??2017-05-10?13:13??comtest1\comtest1\bin\Release\LLBGprsTool.exe
?????文件????????187??2016-10-12?14:13??comtest1\comtest1\bin\Release\LLBGprsTool.exe.config
?????文件??????30208??2017-05-10?13:13??comtest1\comtest1\bin\Release\LLBGprsTool.pdb
?????文件??????22696??2017-05-10?13:14??comtest1\comtest1\bin\Release\LLBGprsTool.vshost.exe
?????文件????????187??2016-10-12?14:13??comtest1\comtest1\bin\Release\LLBGprsTool.vshost.exe.config
?????文件??????19041??2017-05-10?13:16??comtest1\comtest1\COMTool.cs
?????文件???????5433??2016-10-20?12:58??comtest1\comtest1\COMTool.csproj
?????文件????????478??2016-10-18?13:08??comtest1\comtest1\COMTool.csproj.user
?????文件??????11559??2016-10-20?12:58??comtest1\comtest1\COMTool.Designer.cs
?????文件??????12721??2017-05-10?13:14??comtest1\comtest1\COMTool.resx
?????文件???????4150??2016-10-18?13:17??comtest1\comtest1\damotouicon?(1).ico
?????文件????????555??2016-10-17?11:12??comtest1\comtest1\obj\Debug\comtest1.csproj.FileListAbsolute.txt
?????文件????????977??2016-10-17?11:09??comtest1\comtest1\obj\Debug\comtest1.csproj.GenerateResource.Cache
?????文件???????2211??2016-10-12?14:24??comtest1\comtest1\obj\Debug\comtest1.csprojResolveAssemblyReference.cache
?????文件????????180??2016-10-17?11:09??comtest1\comtest1\obj\Debug\comtest1.Form1.resources
?????文件????????180??2016-10-18?13:08??comtest1\comtest1\obj\Debug\comtest1.SetLLBGprs.resources
?????文件???????1609??2016-10-18?13:08??comtest1\comtest1\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????7058??2017-05-10?13:14??comtest1\comtest1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????578??2016-10-18?13:09??comtest1\comtest1\obj\Debug\GPRSTool.csproj.FileListAbsolute.txt
............此處省略60個文件信息
評論
共有 條評論