千家论坛_弱电智能化技术与工程讨论(建筑智能,家居智能,人工智能)

门禁/对讲/一卡通
收藏本版 |订阅

门禁/对讲/一卡通 今日: 1847 |主题: 18133

发新帖
打印 上一主题 下一主题

串口设备联网组网指南...

[复制链接]
smset 发布于: 2007-11-21 10:42 619 次浏览 2 位用户参与讨论
跳转到指定楼层
<p class="MsoToc1" align="left" style="tab-stops: right dotted 414.8pt;"><b><span lang="EN-US" style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt;">CNS</span><span style="FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 12.0pt; mso-hansi-font-family: 'Times New Roman'; mso-ascii-font-family: 'Times New Roman';">串口联网服务器使用指南</span></b></p><table><tbody><tr><td bgcolor="#f1f1f1"><table cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr><td class="title3">&nbsp;CNS210串口服务器</td><td align="right"></td></tr></tbody></table></td></tr><tr><td><table cellspacing="4" cellpadding="0" width="577" border="0"><tbody><tr valign="top"><td width="4"></td><td width="240">·集成TCP/IP协议,全透明传输<br/>·串口转10M/100M&nbsp;以太网接口<br/>·支持局域网/广域网通信<br/>·集成ADSL&nbsp;PPPOE拨号功能<br/>·支持DHCP动态IP及动态域名<br/>·支持Web网页方式配置参数<br/>·支持多种网络通信模式<br/>·支持TCP多主机/多客户端</td><td width="311"><table cellspacing="2" cellpadding="0" width="100%" border="0"><tbody><tr><td width="20"></td><td><a href="http://www.zstel.com/downloadsoft/CNS210用户手册.pdf">CNS210 用户手册</a></td></tr><tr><td width="20"></td><td><a href="http://www.zstel.com/downloadsoft/CNSXXX控制模式通信协议.pdf">CNSXXX控制模式通信协议</a></td></tr><tr><td width="20"></td><td><a href="http://www.zstel.com/downloadsoft/CNS串口联网服务器使用指南.pdf">CNS串口联网服务器使用指南</a></td></tr><tr><td width="20" colspan="2"><a href="http://chat.live800.com/live800/chatClient/chatbox.jsp?jid=4301718610&amp;companyID=58122&amp;configID=40930"><img height="66" src="file:///C:/Documents%20and%20Settings/李强/桌面/live800.JPG" width="186" border="0" alt=""/></a></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td></td></tr></tbody></table><p class="MsoToc1" align="left" style="tab-stops: right dotted 414.8pt;"><br/><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166201">一、通讯基础知识<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166202">1、TCP方式<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166203">2、UDP方式<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc1" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166204">二、通讯拓扑结构<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166205">1、两个串口设备之间通过以太网通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166206">2、一个(或多个)串口设备通过以太网与一台PC通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166207">3、多个串口设备通过以太网互相通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166208">4、多个串口设备通过以太网与多台PC互相通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166209">5、多台PC通过以太网与一台串口设备通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc1" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166210">三、不同模式下的参数配置方法和通讯示例<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166211">1、两个串口设备之间通过以太网通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166212">2、一个(或多个)串口设备通过以太网与一台PC通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166213">3、多个串口设备通过以太网互相通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166214">4、多个串口设备通过以太网与多台PC互相通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc2" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166215">5、多台PC通过以太网与一台串口设备通讯<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; FONT-VARIANT: normal;"><p></p></span></p><p class="MsoToc1" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166216">四、跨网访问<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p class="MsoToc1" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166217">五、CNS设备的PPPoE功能<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p class="MsoToc1" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166218">六、使用动态域名(DNS)的方式<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p class="MsoToc1" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166219">七、使用DHCP的注意事项<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p class="MsoToc1" style="tab-stops: right dotted 414.8pt;"><span class="MsoHyperlink" lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体;"><a href="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS210GUIDE.htm#_Toc169166220">八、网络异常时CNS设备的处理<span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-tab-count: 1 dotted; mso-hide: screen; text-underline: none;">. </span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">2</span><span style="DISPLAY: none; COLOR: windowtext; TEXT-DECORATION: none; mso-hide: screen; text-underline: none;">
                                </span></a></span><span lang="EN-US" style="FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; TEXT-TRANSFORM: none; FONT-FAMILY: 宋体;"><p></p></span></p><p align="left"><b><span lang="EN-US" style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt;"><p></p></span></b></p><p><span lang="EN-US">&nbsp;</span><span lang="EN-US" style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">为满足不同客户的各种应用,</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备提供多种工作模式,包括</span><span lang="EN-US">TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">TCP Auto</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">UDP Master</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">UDP Slave</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">广播、</span><span lang="EN-US">UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">组播等。用户在初次使用</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备时,要从这么众多的模式中选择适合自己的模式,实属不易。本文档从不同应用角度出发介绍不同的组网方案和如何在不同的模式下设置</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块,希望能对用户使用</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备有所帮助。</span></p><p><a name="_Toc169166201"><span style="COLOR: windowtext; mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">一、通讯基础知识</span></a><span lang="EN-US" style="COLOR: windowtext;"><p>
                        </p></span></p><p style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span lang="EN-US">TCP/IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">分层模型的传输层提供了</span><span lang="EN-US">TCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">和</span><span lang="EN-US">UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">两种协议,这两种协议为</span><span lang="EN-US">TCP/IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">网络上的应用程序提供了传输机制。</span><span lang="EN-US">TCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">提供有保证和可靠的信息传输;而</span><span lang="EN-US">UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">使用无保证和不可靠的方法来传输信息。</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166202"><span lang="EN-US" style="mso-fareast-font-family: 宋体;">1</span></a><span style="mso-ascii-font-family: Times New Roman; mso-bookmark: _Toc169166202;">、</span><span lang="EN-US" style="mso-fareast-font-family: 宋体; mso-bookmark: _Toc169166202;">TCP</span><span style="mso-bookmark: _Toc169166202;">方式</span><span lang="EN-US"><p>
                        </p></span></p><p style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span lang="EN-US">TCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">协议是基于连接的有保证的协议,在传输数据之前必须首先建立双向的连接,数据传输完成后断开连接。在发送数据时需要收到接收主机的确认才能继续发送。如果数据出错或者没有收到确认需要一定次数的重发。这会额外增加一定的通讯量,使其不如</span><span lang="EN-US">UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">方式快速。</span><span lang="EN-US">TCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">通讯包括客户端(</span><span lang="EN-US">Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">)与服务器(</span><span lang="EN-US">Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">),客户端主动连接服务器,服务器只能被动连接。当然连接一旦建立,客户端与服务器都能随时双向的传输数据。</span></p><p style="MARGIN-LEFT: 39pt;"><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块采用</span><span lang="EN-US">TCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">通讯的模式有:</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">TCP Auto</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">。</span></p><p style="MARGIN-LEFT: 60pt; TEXT-INDENT: -21pt; tab-stops: list 60.0pt; mso-list: l6 level1 lfo2;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块工作在</span><span lang="EN-US">TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式时,它不会主动连接其它设备,而是在本地端口上进行侦听,等待客户机的连接,与客户端建立连接后就可以双向通讯了。</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块支持同时多个客户端的连接,如果最大连接数已满,必须等待已有的连接断开或者模块释放异常的连接后,才允许其他客户端的连接。</span></p><p style="MARGIN-LEFT: 60pt; TEXT-INDENT: -21pt; tab-stops: list 60.0pt; mso-list: l6 level1 lfo2;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块工作在</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式时,它将主动连接事先设定好的</span><span lang="EN-US">TCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">服务器</span><span style="mso-bidi-font-size: 9.0pt;">,如果连接不成功会不断尝试连接,连接成功后就可以与服务器进行双向数据通讯了。</span></p><p style="MARGIN-LEFT: 60pt; TEXT-INDENT: -21pt; tab-stops: list 60.0pt; mso-list: l6 level1 lfo2;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Auto</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块工作在</span><span lang="EN-US">TCP Auto</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式时,它会在</span><span lang="EN-US">TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">和</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式之间自动切换,在没有数据发送时模块工作在</span><span lang="EN-US">TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式,等待客户机连接,当串口收到数据,并且又没有客户机连接自己,设备会自动切换到</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式,主动连接服务器。</span></p><p style="MARGIN-LEFT: 60pt; TEXT-INDENT: -21pt; tab-stops: list 60.0pt; mso-list: l6 level1 lfo2;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块工作在</span><span lang="EN-US">Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式时,服务器端需要安装虚拟串口软件,设备实际上工作在</span><span lang="EN-US">TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式,在客户端运行的一个服务程序将主动连接该模块,并且服务程序会为每一个设备虚拟一个串口,对用户来说,此串口就相当于模块的串口。这种模式可以使用户以前基于串口的服务器软件直接使用,不用重新开发服务器端软件。</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 31.5pt; LINE-HEIGHT: normal; mso-char-indent-count: 3.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166203"><span lang="EN-US">2</span></a><span style="mso-ascii-font-family: Times New Roman; mso-bookmark: _Toc169166203;">、</span><span lang="EN-US" style="mso-bookmark: _Toc169166203;">UDP</span><span style="mso-bookmark: _Toc169166203;">方式</span><span lang="EN-US"><p>
                        </p></span></p><p style="TEXT-JUSTIFY: inter-ideograph; TEXT-INDENT: 21pt; TEXT-ALIGN: justify; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span lang="EN-US" style="mso-bidi-font-size: 12.0pt;">UDP </span><span style="mso-bidi-font-size: 12.0pt;">协议是无连接的不可靠协议,在传输数据时不需要建立</span>连接,传输数据时也不需要接收主机的确认信息,所以<span lang="EN-US">UDP</span>不能保证发往目标主机的数据包被正确接收,在对可靠性要求较高的场合可以通过用户上层的通信协议来保证数据正确。<span lang="EN-US">UDP</span>是一种较简单的通信方式,它不会增加过多的额外通信量,可以提供比<span lang="EN-US">TCP</span>方式更高的通信速度,以保证数据包的实时性。<span lang="EN-US">UDP</span>不存在服务器和客户端。通讯双方是对等的。<span lang="EN-US"><p>
                        </p></span></p><p><span lang="EN-US" style="mso-tab-count: 2;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span lang="EN-US">CNS</span>模块采用<span lang="EN-US">UDP</span>通讯的模式有:<span lang="EN-US">UDP Master</span><span style="mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">UDP Slave</span><span style="mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">UDP</span>广播、<span lang="EN-US">UDP</span>组播。<span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 63pt; TEXT-INDENT: -21pt; tab-stops: list 63.0pt; mso-list: l3 level3 lfo1;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP Master</span></p><p style="MARGIN-LEFT: 63pt;"><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块工作在</span><span lang="EN-US">UDP Master</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式时,模块收到的串口数据都以</span><span lang="EN-US">UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">数据包发往设定好的目标主机</span><span style="mso-bidi-font-size: 9.0pt;">,模块接收发往本地端口的任何</span><span lang="EN-US" style="mso-bidi-font-size: 9.0pt;">UDP</span><span style="mso-bidi-font-size: 9.0pt;">数据。</span></p><p style="MARGIN-LEFT: 63pt; TEXT-INDENT: -21pt; tab-stops: list 63.0pt; mso-list: l3 level3 lfo1;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP Slave</span></p><p style="MARGIN-LEFT: 63pt;"><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块工作在</span><span lang="EN-US">UDP Slave</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式时,模块接收任何发往本地端口的数据,然后记忆最后一次给模块发送数据的目标主机,模块的串口数据都发往最后一次与设备通讯的主机</span><span style="mso-bidi-font-size: 9.0pt;">。</span></p><p style="MARGIN-LEFT: 63pt; TEXT-INDENT: -21pt; tab-stops: list 63.0pt; mso-list: l3 level3 lfo1;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">广播</span></p><p><span style="mso-bidi-font-size: 12.0pt;">此模式用于局域网内的广播,设备收到的串口数据都以广播方式发送,在同一网络内的所有设备都能接收到广播数据,</span><span lang="EN-US" style="mso-bidi-font-size: 12.0pt;">CNS</span><span style="mso-bidi-font-size: 12.0pt;">设备也接收所有广播数据。如果用户的网络内有不需要与</span><span lang="EN-US" style="mso-bidi-font-size: 12.0pt;">CNS</span><span style="mso-bidi-font-size: 12.0pt;">模块通讯的设备,也会接收到广播数据,所以不推荐使用广播模式,可以使用后面的</span><span lang="EN-US" style="mso-bidi-font-size: 12.0pt;">UDP</span><span style="mso-bidi-font-size: 12.0pt;">组播模式完全替代。<span lang="EN-US"><p>
                                </p></span></span></p><p style="MARGIN-LEFT: 63pt; TEXT-INDENT: -21pt; tab-stops: list 63.0pt; mso-list: l3 level3 lfo1;"><span lang="EN-US">&Oslash;<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">组播</span><span lang="EN-US" style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p style="MARGIN-LEFT: 63pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">此模式为广播的一种特殊情况,即分组广播。由远端</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址参数指定组播</span><span lang="EN-US">ID</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">号,组播</span><span lang="EN-US">ID</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">为</span><span lang="EN-US">224.0.0.0</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">以上的</span><span lang="EN-US">D</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">类</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址,有一些系统保留的地址不能使用。只有组播</span><span lang="EN-US">ID</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">相同的设备才能互相广播数据,此模式可轻松实现用户的多个</span><span lang="EN-US">485</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备不经任何修改直接升级为通过以太网互连。</span></p><p><a name="_Toc169166204"><span style="COLOR: windowtext; mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">二、通讯拓扑结构</span></a><span lang="EN-US" style="COLOR: windowtext;"><p>
                        </p></span></p><p style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">下面介绍的几种拓扑结构基本上能够满足大部分客户的绝大部分应用,在相应的拓扑结构中,会推荐用户使用</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块的哪几种通讯模式,但是这并不是一成不变的,基本上所有模式都能在这些不同的拓扑结构中使用,只不过用户需要根据自己的使用条件、使用环境等因素选择一种最适合自己的通讯模式而已。</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166205"><span lang="EN-US">1、两个串口设备之间通过以太网通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">一个设为</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">,另一个设为</span><span lang="EN-US">TCP Server</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">都设为</span><span lang="EN-US">UDP Master</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166206"><span lang="EN-US">2、一个(或多个)串口设备通过以太网与一台PC通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Sever</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP Master</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166207"><span lang="EN-US">3、多个串口设备通过以太网互相通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">组播模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166208"><span lang="EN-US">4、多个串口设备通过以太网与多台PC互相通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">组播模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166209"><span lang="EN-US">5、</span></a><span style="mso-bookmark: _Toc169166209;">多台<span lang="EN-US">PC通过以太网与一台串口设备通讯</span></span><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP Slave</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;"></span></p>
回复

使用道具 举报

已有2人评论

新浪微博达人勋

千家认证

沙发
smset 发表于 2007-11-21 10:44:00
<p><a name="_Toc169166204"><span style="COLOR: windowtext; mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">二、通讯拓扑结构</span></a><span lang="EN-US" style="COLOR: windowtext;"><p>
                        </p></span></p><p style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">下面介绍的几种拓扑结构基本上能够满足大部分客户的绝大部分应用,在相应的拓扑结构中,会推荐用户使用</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块的哪几种通讯模式,但是这并不是一成不变的,基本上所有模式都能在这些不同的拓扑结构中使用,只不过用户需要根据自己的使用条件、使用环境等因素选择一种最适合自己的通讯模式而已。</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166205"><span lang="EN-US">1、两个串口设备之间通过以太网通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">一个设为</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">,另一个设为</span><span lang="EN-US">TCP Server</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">都设为</span><span lang="EN-US">UDP Master</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166206"><span lang="EN-US">2、一个(或多个)串口设备通过以太网与一台PC通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Sever</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP Master</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166207"><span lang="EN-US">3、多个串口设备通过以太网互相通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">组播模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166208"><span lang="EN-US">4、多个串口设备通过以太网与多台PC互相通讯</span></a><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">组播模式</span></p><p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: normal; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><a name="_Toc169166209"><span lang="EN-US">5、</span></a><span style="mso-bookmark: _Toc169166209;">多台<span lang="EN-US">PC通过以太网与一台串口设备通讯</span></span><span lang="EN-US"><p>
                        </p></span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TCP Server</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Real Com</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p><p style="MARGIN-LEFT: 84pt; TEXT-INDENT: -21pt; tab-stops: list 84.0pt; mso-list: l3 level4 lfo1;"><span lang="EN-US">l<span style="FONT-STYLE: normal; FONT-VARIANT: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>UDP Slave</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模式</span></p>
回复 支持 反对

使用道具 举报

新浪微博达人勋

千家认证

板凳
smset 发表于 2007-11-21 10:45:00
<p><a name="_Toc169166210"><span style="COLOR: windowtext; mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman; mso-bidi-font-weight: normal;">三、</span></a><span style="COLOR: windowtext; mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman; mso-bookmark: _Toc169166210;">不同模式下的参数配置方法和通讯示例</span><span lang="EN-US" style="COLOR: windowtext;"><p>
                        </p></span></p><p style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">本节介绍</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备与</span><span lang="EN-US">PC</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">之间或</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备之间都在同一个以太网络环境下的参数配置和通讯示例。在不同的网络内或者需要通过</span><span lang="EN-US">Internet</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">访问,在后面的章节介绍。</span></p><p style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">在各种组网方案中,首先都需要</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块能够在网络内正常工作:如物理网络连接正确、</span><span lang="EN-US">MAC</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址、本机</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址、子网掩码配置正确。下面首先介绍与几种组网方式无关的和让</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块在网络内自身能正常工作的基本参数配置。</span></p><p align="center" style="TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt;"><span lang="EN-US" style="mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;"><shapetype id="_x0000_t75" coordsize="21600,21600" ospt="75" opreferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path oextrusionok="f" gradientshapeok="t" oconnecttype="rect"></path><lock vext="edit" aspectratio="t"></lock></shapetype><shape id="_x0000_i1025" oole="" type="#_x0000_t75" style="WIDTH: 185.25pt; HEIGHT: 41.25pt;"><imagedata otitle="" src="file:///C:/DOCUME~1/李强/LOCALS~1/Temp/msoclip1/13/clip_image001.png"></imagedata></shape><img height="55" src="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS2101.jpg" width="247" align="left" vshapes="_x0000_i1025" alt=""/><br/></span></p><p style="MARGIN-LEFT: 21pt;"> </p><p style="MARGIN-LEFT: 21pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">配置密码:通过网络配置</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块的操作密码,用户可以设置成自己希望的值。</span></p><p style="MARGIN-LEFT: 21pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备名称和设备地址:这</span><span lang="EN-US">2</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">个参数完全不参与</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块的工作,用户可以把名称参数设成不同的字符来区别不同的</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备。</span></p><p align="center" style="MARGIN-LEFT: 21pt;"><span lang="EN-US"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><shapetype id="_x0000_t75" coordsize="21600,21600" ospt="75" opreferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path oextrusionok="f" gradientshapeok="t" oconnecttype="rect"></path><lock vext="edit" aspectratio="t"></lock></shapetype><shape id="_x0000_i1025" oole="" type="#_x0000_t75" style="WIDTH: 198pt; HEIGHT: 44.25pt;"><imagedata otitle="" src="file:///C:/DOCUME~1/李强/LOCALS~1/Temp/msoclip1/13/clip_image001.png"></imagedata></shape><img height="59" src="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS2102.jpg" width="264" align="left" vshapes="_x0000_i1025" alt=""/>
                </span></p><p style="MARGIN-LEFT: 21pt;"><span lang="EN-US" style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></p><p style="MARGIN-LEFT: 21pt;"> </p><p style="MARGIN-LEFT: 21pt;"><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">这几个参数是保证</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块能够在网络内正常工作的基本参数,</span><span lang="EN-US">MAC</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址要保证唯一,即不同的</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块必须设置为不同的值;本机</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址为</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块在以太网内的唯一</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址,在同一个以太网内,所有</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备与所有</span><span lang="EN-US">PC</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">的</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址不能相同;子网掩码确定</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块所在的网络</span><span lang="EN-US">ID</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">,所以在同一网络内,所有模块的网络</span><span lang="EN-US">ID</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">必须相同,主机</span><span lang="EN-US">ID</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">必须不同。简单的说就是子网掩码字节为</span><span lang="EN-US">255</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">对应的</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">字节在同一个网络内必须一样,子网掩码字节为</span><span lang="EN-US">0</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">对应的</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">字节在同一个网络内必须不一样。如果用户的网络内有</span><span lang="EN-US">DHCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">服务器</span><span lang="EN-US">(</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">大部分</span><span lang="EN-US">ADSL MODEM</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、路由器都可以设置成为允许</span><span lang="EN-US">DHCP)</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">,那么用户可以设置本机</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址为</span><span lang="EN-US">0.0.0.0</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">,自动获得</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址参数设为“开”,这样</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备就能够自动从网络内分配到</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址,但是</span><span lang="EN-US">DHCP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">分配的</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址有可能经常改变,所以此方法只适用于</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块工作于</span><span lang="EN-US">TCP Client</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">、</span><span lang="EN-US">UDP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">广播或组播等对方不需要知道此模块的</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址的场合,如果模块需要被动接受对方的连接,而</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址又经常变化,那可是一件很麻烦的事情。</span></p><p align="left" style="MARGIN-LEFT: 21pt;"><span lang="EN-US" style="mso-tab-count: 1;"><br/><span lang="EN-US" style="mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;"><shapetype id="_x0000_t75" coordsize="21600,21600" ospt="75" opreferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path oextrusionok="f" gradientshapeok="t" oconnecttype="rect"></path><lock vext="edit" aspectratio="t"></lock></shapetype><shape id="_x0000_i1025" oole="" type="#_x0000_t75" style="WIDTH: 199.5pt; HEIGHT: 108pt;"><imagedata otitle="" src="file:///C:/DOCUME~1/李强/LOCALS~1/Temp/msoclip1/13/clip_image001.png"></imagedata></shape>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img height="144" src="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS2103.jpg" width="266" vshapes="_x0000_i1025" alt=""/>
                        </span><br/><br/></span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">上面几个参数中,</span><span lang="EN-US">I/O</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">口参数配置根据用户需要自行设置,如果没用到</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块的</span><span lang="EN-US">IO</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">口可以不予理睬此参数;维护端口号可以采用默认,也可以修改为用户自定义的端口;网关</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址在跨网访问时才会用到;</span><span lang="EN-US">DNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">服务器</span><span lang="EN-US">IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址、自动获得</span><span lang="EN-US">DNS IP</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">地址参数为需要访问</span><span lang="EN-US">Internet</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">上的动态域名时才会用到;</span><span lang="EN-US">PPPoE</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">的</span><span lang="EN-US">3</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">个参数需要</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块自己拨号接入</span><span lang="EN-US">Internet</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">时才需<br/>要,后面的章节介绍。</span></p><p align="left" style="MARGIN-LEFT: 21pt;"><span lang="EN-US" style="mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA;"><shapetype id="_x0000_t75" coordsize="21600,21600" ospt="75" opreferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path oextrusionok="f" gradientshapeok="t" oconnecttype="rect"></path><lock vext="edit" aspectratio="t"></lock></shapetype><shape id="_x0000_i1025" oole="" type="#_x0000_t75" style="WIDTH: 180pt; HEIGHT: 68.25pt;"><imagedata otitle="" src="file:///C:/DOCUME~1/李强/LOCALS~1/Temp/msoclip1/13/clip_image001.png"></imagedata></shape><img height="91" src="file:///D:/work/我的编程/网络信息发布助手/ProductPages/CNS210/CNS2104.jpg" width="240" vshapes="_x0000_i1025" alt=""/>
                </span></p><p><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">&nbsp;&nbsp; 上面的几个参数为串口配置参数,用户需要根据自己设备的串口配置决定。</span></p><p><span lang="EN-US" style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">以上参数配置好后,</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备就已经能够在网络内正常工作了,但是如果需要</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备能够与</span><span lang="EN-US">PC</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">或者其他的</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">设备通讯传输数据,还需要配置网络模式、目标参数等,下面就介绍在不同的组网方案中如何配置和使用</span><span lang="EN-US">CNS</span><span style="mso-hansi-font-family: Times New Roman; mso-ascii-font-family: Times New Roman;">模块。</span></p>
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆 千家通行证登陆

本版积分规则

千家智客微信号
千家智客微信
玩物说商城
玩物说商城