欧姆龙PLC以太网TCP命令FINS协议实验

上传人:M****1 文档编号:546009610 上传时间:2022-11-09 格式:DOCX 页数:10 大小:231.38KB
返回 下载 相关 举报
欧姆龙PLC以太网TCP命令FINS协议实验_第1页
第1页 / 共10页
欧姆龙PLC以太网TCP命令FINS协议实验_第2页
第2页 / 共10页
欧姆龙PLC以太网TCP命令FINS协议实验_第3页
第3页 / 共10页
欧姆龙PLC以太网TCP命令FINS协议实验_第4页
第4页 / 共10页
欧姆龙PLC以太网TCP命令FINS协议实验_第5页
第5页 / 共10页
点击查看更多>>
资源描述

《欧姆龙PLC以太网TCP命令FINS协议实验》由会员分享,可在线阅读,更多相关《欧姆龙PLC以太网TCP命令FINS协议实验(10页珍藏版)》请在金锄头文库上搜索。

1、ETN21 以太网 fins/TCP 命令实验时间:2014年 10 月 8 日实验设备:CP1H-XA40DR-A、CP1W-EXT01、CJ1W-ETN21、网线实验目的:利用SOCKETTOOL发送fins/TCP命令,对CP U内存进行读取和写入。实验步骤:1、 IP 地址设置:打开电脑本地连接查看 IP 地址如下1 nlernet 协iK版本 4 (TCP/IPv4J 眉性常规设置否则自动毅得IP地址血)使用下面的IP地址:子网掩码0J):默认网关皿IF地址:usb线连上电脑,打开I/O表,将ETN21模块的ip地址与电脑设置为同一 个网段不同节点,节点号跟硬件上的node numb

2、er 一样,下载重启模块,如 下:2JlW-ETN21(ETN21Mode:.设定| FINS/TCF | DHS SMTP FOF |曲件地址|邮件岌送|履由E件|时钟自动调整| HTTP |花全 1 (4. 3BSD) 广全 0 (;4. ZBSDP工F地址| 10 .110 . 59 . 3子网擅码| 255 .255 .255 . 0厂 TCIDR2、 配置 socketool 软件软件选TCP Client,创建,输入ETN21的IP地址和端口号,端口号9600,如下:对方端口 9600确走取消口点击连接,显示十六进制值打勾:3、 握手信号TCP 方式客户端需要发给服务器握手信号,等

3、待服务器正常反馈表示握手成功,才能正常交流数据。客户端发出的命令格式如下:FINSTCP header 气(tyytesj44444Clierrt ncde address_Heider_ LengthCaiimiindErrr codeThe details cf the aboveirine ar shwn in the following 协ble.hemC-ontetite. (hexadeciinal)RemarksHeader46494 E&3ASCII code: FINSLength12 bytes- Length of data from eomrnand onwards.C

4、ommand0000)000Error codeNot used, so does nt require checking by serverClient node add ress(FINS ncde addiess oi Fl NS.TCP client00000000 to OOOOOOFE0 to 2 54Note: Client FINS node addresses are autarnaticlly olitained when set to 0.服务器反馈的命令格式如下:The details of the above frame are shown in the follow

5、ing table.ItemContents (hexrKkciinal)RemarksHeader46494E53ASCII code: FINSLength0000001016Length of data fromcom mand orwards.Command00000001Error codeRefer to llie following table of Biro r codes.Client node address fFINS rode add less of FINS.-TCP client)00000001 io OOOOOOFE1 to 2 54SeruEr node ad

6、dress tFins node addiiess of FINS.-TCP s eiver)00000001 io OOOOOOFE1 to 2 54故 sockettool 发送命令为:46494E53 (FINS) 0000000C (长度 12 字节)00000000 (命令 代码)00000000 (错误代码)000000D6 (客户端节点号214),即:46494E530000000C0000000000000000000000D646494E530000000C00000000000000000000003C反馈是 46494E53 (FINS) 00000010 (长度 16

7、字节)00000001 (命令代码)00000000 (错误 代码)000000D6 (客户端节点号)00000003 (服务器节点号)通讯建立成功。4、TCP 命令命令帧如下,ETN手册W421第7-4有相关介绍,如下:Size(bytes)FINS frame -:卩呢1聞 : 12 to 2 ,ai 2 CR ef er to 7-2 fl WS Frames foe ctet ails.)The details of lhe abav6 frame are shown in the following table.hemContents hexode-ci maljRemarks;He

8、ader46494E53ASCII code:FINSLengthQQQWQ14t-? QCQQQ7E420 to 2Q2Q bytes; Length of data After comm and.Command00000002ErrrQQQQQQOTNot used, does no-t require checking b/at the receiving end.FINS fmmeFrom RNS header IGF to end of data.Fins 命令格式:FINS Commo nd Frame FormatSize (bytes) IGF. .RSYGCTDNARNS h

9、eader DA1_.SNA_SA1 .SA2 sidFINS command -MRC-SRCFINS parameterdata “Parameter data field2000 maxContentsDisplays Iram informationReserved by system.Permtssibte number of gatewaysDestination network addressDestination node addressDestination unit addressSource network addressSource node addressSource

10、 unit addressService IDMain request codeSub-request cocfeCommand parameters and send dataThe data length depends on the MRC and SRCSize (bytes)ContentsFINS Response Frame FormatFINS headerFINS command尸MRESFINSSRESparameler/data field Data10Sarno as in command frame.2Same as in command frame.Main res

11、ponse code1Sub-response code1998 max.际妙沖拒There are some frames in which the data lengih isO.FINS HeaderInformation100000朗,6 二 匕 j 二 1 iICF (Information Control Field) - Response Request Bit(0: Rospcxiso rajuirod; 1: Responso not roquirGd)Kmd of data (0 command, 1: response)00 Hex):Local PLC Uril01 t

12、o FE (Hax): Destinalion node address (1 to 2&1)FF (Hex):Broadca&lingWhen multiple Comnnunicattms Units are mounted. DA1 specifies the node addn&ss of the Unit connected to the network specified by DNA.RSV (Reserved by Systenn)Set to 00 (Hex).GCT Permissible Number of Galeways)Set to 02 (Hex).DNA (Oe

13、stination Network Address)Sp&cifi&s the number of rha nerwark whera lh& deslinsiian node is located. The address can be specified in tfie 1bllowing range.00 (Hex):Local network01 Io 7F (Hex):Destination network address (1 Id 127)DAI Destination Node AddressDA2 (Destination Unit Address)Specifies the

14、OO(Hei): 10 Io 1F (Hex);E1 (H 明:FE (Hex):number of the Unit at the destination node.PLC (CPU Unit)CPU Bus Unit unit numbers 01o15 (15 Io 31) Inner BoardUnit connected to network.SNA (Source Network Address)Specifies the numbeir of lhe network whs re the local node is located. Th 已 ranges of numbers lhat can be speoiiied are the same as for DNA.SAI (Source Node Address)Specifies the local node address. The

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号