按关键词阅读: 解析 实例 周期 ProfiNet
1、PROFINET过程数据报结构F图展示了一个 PROFINET周期性过程数据报的一般结构:DestiryillcnSclfcg vacsodr&sfiFrancIdtTSDU * Padding L&mft 酗-I MO2UU Status此结构基于使用 VLAN标签的第二层以太网帧 。
当每个 PROFINETIO设备和 PROFINETIO 控制器发送 VLAN域的时候 , 有可能被中间的网络交换机移除掉 。
分析报文的时候这个需 要考虑到 。
C_SDU域包含需要传输的数据 。
带VLAN的以太网帧的最小长度是64字节 , 如果C_SDU域的长度小于40字节会自动填补 。
APDU状态域包含周期计数和额外的状 态字 。
【Profinet|Profinet周期帧实例解析】2、节 。
C_SDU由两种类型的数据组成:IO数据对象IOCS对象每个数据项与一个特定的子模块相连 。
IO数据对象包括过程数据和子模块的相关IOPSIOCS对象仅仅包含子模块的IOCS个 C_SDU常常包含多个对象 。
在C_SDU中的过程数据的实际位置已经在连接开始的时候的RPC Connect Service中被参数化 。
在两个相邻的项目中可能被插入额外的填充值 。
数据项的结构由下图展示 。
通常IOPS和IOCS的长度为一字节 。
Process DataIOPS解析示例下面通过一个例子描述整个过程数据报的解析过程 。
解析的帧是一个输入IOCR提取结构信息第一步要从 RPC Connect Service中分析出 。
3、需要的结构信息 。
通过 WireShark很简单就能完 成 。
下图展示了 RPC Connect Request和需要被用来解析一个 In put IOCR报文的部分 。
红 色框住的是In put IOCR的描述 , 包含了帧ID和在C_SDU里面的数据项的偏移值 。
相关的 过程数据能从黄色框中的 Submodule Requests提取 。
+ f Thr n#T it |时屿 fl 母 *.2 i *X 2 (00 a? k? :? j :40! 4a psi!?4 ? 昭 如:聊丙2:24:井:码打+ Internci Pratocal Grsinri 4 ire: 1401 XSJ-OlI C1M- 。
4、15B.Q. 1 B Dsi: 197. IfiE. a. 2 (LW. IBS-0.2啊 已町 MTflfrriin fr 杓 nwijl? J?19?.a.1WNIO-CI*?CI6 hr 1t*#$)诋童 z, Towrqt电p1百4.fiM12553Ci132-160-3.1192.16aG-2Fwra-cwtarite- request, 10-nwriteRe匚一丄上出厂.誇pi17i2a. .2193-10,1呻如廿茁建叩1认脚利“卄.11“卿网珂1知応飢人】1弧1钩N刑HCF39Q2O1口1.若區k P. fM7 , IM, 9UiWYlt704 wr it a- rsspen 。
5、s-a L li-k. , lODwr i t af -&H-asr23i 962*B6?C192 16*. 0.2=miO-CK211 isr It* r|i#5C . IdWF -iTti., 叩 1J31.1虬血eriio *Ci*Z0* hr 1 E p tipdfiae. -rit Ci.ffffI : _3cL:331 Ratio: It, bne:l Pli :1b 1 邛电CTiSflS5M0WB-yM-J-Tiil-WOc-Ftl Ethernet IIB Stc: Hi lscfier_21:90:9a (.00:02 :a2:21:90:9aJ . Dst: Hi 1 s 。
6、cberJ4:2e:4Z Q00:02:a2:24 :2e:42 U incarnGL ptolocq! version 4. src: 192.16S 0l. (192.168 0 1) r dst: 192 丄呑密0工(192 丄 E0O .2) 3 User Datagrajiii Protocal, Srt Part: cap (1026J B Ost Port: profi net-cm (14M4)0 Distributed ewipurlng Errvlreminent / Remote Procedure call Cdle RPt) Request.石Eq;
0 serial 。
7、: cP Fr El propinet xo. conncciLap#ration: fcyinpct (0Argsaxi huhti: 417Ar qsLength: 424ffl Array:; Mass 41?6b OFtet: 0, 512e:S 424ill AA&lGckFLq:事岀舌恤“:釘 MAC 00:02 : a2;
21:9O:9d( Purl :0m S892 p 5 tat ion: control 1 erH AlarirCRBliockiReqi Al firm CRj LT-OxSBJj TFactor :1 p Retries 3T Ref :0x0k Len: 。
8、200 Tag zOcOOO/OxaAOO ffl KKRBl&ckficq: input CR. Ref :cx5i iLeni:4QP Framei0;ox6OQDt GudcTE車 Raviq;
Phase: 1 Apissl 田 l0CRBlpckReq Output CR, Ref: 0x6 R l 质FrcIDzOnf FFF , clk:32 RaXpQ;. Phe ;
1 apis :1IH Expecteri5ubinociu ieB lockReq: APT5:1 , 5nbmodu les :4f-i el ocLheader : Type-xpeccedsubmodule 。
9、sl ockReq, LengLti-74 f+码).vrsl on-JL. 0MuirberOf APIs: 1*PI: ori slot:oxo. idemuirtser-oxi201 PiropertiessMO submdulesM 4PI: OKDOOOOOOOSi t H ufflbr : 0x00 DC潭Qdu1eidentNumber: oxCWOT1ZQLKodu 1 eProperti es: OkO-ODOunt9 e rCT Sub modu 1e5 : 4Ed utHiuaule: Subi.lot:OkI p idtiriL :Om1200 Proper t0x0S 。
10、ubilothu*mbr s 0x0001sybffoduleidcntMinber s QxaowiZQOg 5ubmQ4ulfiPrwrti5 ; OxOOQOffi DatsDescript-ion: inpurt, 5utxnodn 1 eDataLength: 0P LengthT0C5: 1. uflLengthlOPS: 1El sutnDGule: subs 1 oi :OxSDJ. icenL:O)LL20|l prope匸 1 es: 0x0Sui bs 1 ot rHuinbe : OxAO-OhCsubmoduleiderttMjmhcr: oxo0001201H su 。
11、bmodultiPro0iri1s : 0x00QOS nmtarscription: Input, 5ufcmejdn 1 FBaitaLngth: 0p i i?rigthr uBL#-ngthJOP: 1H Subm&duie: subs!crc;
0x8001. ident ;
0x1203 ProperrieszoxoSubsilotfHumber : 0x6001Sui b modu 1 e Tdent humbe r: 0x0 0001202LH ubuuclule Proper ties: 0x0000IB D4irD#serocKKq:3!L, bumoauies:iid Lx 。
12、pecdsubfnodulBlackRq:ub1cs)P 5-66 byres cap(yrl C452S btis)ft Ethernet II. Src: Hl lsdter_21:90:9a (0HDjO2:a2:21:90;. tot: Hl lscher_24;
2e:42 (00:02:a2:24:2B:4ZJiP I nt r net Protocol Version X Src: 192.16B. 0.10.1. Ot: 102.1l.O.2 (102.16. 0.2)也 則尊*1厂 D宙rsiqrai價 Pror&rcl j. Src P口厂t1 : rap flDJC , D 。
13、sf port: piroFir.pt-cni (TH号&*)bt Dlsrri buTzed catnpurlnq Etwiromenr / Resoce procedur e 匚al 1 fDCE/upcrRequesz r set;
: 0, ser 1 al i Opi Frag : On Fraie mtofiimlt i-o, connectopadLt i筒:CQFf-iet CO)ArgrsMaxfuum:: 4176 ArgsLemjrhi: 424jj Array : max: 4176r offser : 0 ( size: 424jj AftB-iackHeq: TCAl 。
14、ngn釘 S1om:2, MAC:00:&2:a2:2i:90:aB Ptri :Ok852 StatlGnlCdrurol ler n AlirnCWlotkRq;
ilarm CR* L1N0耳8曲2申 TTittorsli 恥ticd.恥仁仙 LfiiR;200 TAg;
OxtOGQyOx0(Kl togk Block Req: input CR. Ref : 0x5 Len:40ri FraraelDiiGxaOOO- Clock;
32 i Ratio:lB phase:! APlsrl j IGCiRElDckfteq: output CK . Ref zascb, LenD.,。
15、FramelDtzOxffff B Clock: 32 , Raticzlg, Phase:1 APIs: 1 jj 左屛pe 匚tEdfaubiKiMLiTEisTtJtlcitqt 更PJisti ” 雷 ufeiulun es 旦 E K|utnodu I1 OCkRq: 如 1$: 11 &s: 1elockHeaer : Typt-ExpcctediiibBQctuil cBlockiREg4 Length-32(Mi VErsion-liO MunberpfAPI?: 1-i API: O. slor :Oxl. I dent Number iDxl Fr ope rt 1 es: 。
16、 OxO 5u bmodlu 1 e s: 1 OjcOOOOOOOO51 at Im umibf r;
OkOOQIModuli el dentNumber: OxOOODOOdlMc-dul eP roperti es: OxOOM rofsijbjMdul 电兮!1sutiiwcltile? subsloc ;0xl,protwrxiessOxlSubslothumber;
OxMGISub nodu 1 el:iEritAijnit: er: DxGsjOCOO-LIl| iiubnodulePropertl e5 i DxOU 321 DaTaDfiscrlprlant inputs 。
17、 ubMadulalengrh! 16, LwigThKKS! 1 p ufiLcingrhlCiS! 1日 E-l ackHiad?r : Type-EMpCted5ubDdul eBlockREqB Ir V?rsi onI 0iMuiberOfAPIs: 1d AFiz oB slot:0x2s iderthumberiOmXI properties:&xISOuCijDMUneUcrIPFaioal|Lg |- faJL JJL r XVU-rUT-r XU r L10i4. 7746&54JOHilscher_21:90:9aHilscher_2432C:42PN10MRTCZiID:106X6B0 rrsei io csc;orrsurr)?rOutputProcess DateProvider Slaus(IOPS)Provide-GonsumerOuiputIOCRConsurrftrImaQeu ID PM Off sot nu ICoSlOPSOnseusOfTsellOPSConsumerGcnsuiticrStatus (IOCS)CcnaurncfProviderInpiit IOCRDPM Outputu Prov Imace lOCSOff&ct u sOfse: 10 DSP novFderAreaProv deImaQe 。

稿源:(未知)
【傻大方】网址:/a/2021/0816/0023745174.html
标题:Profinet|Profinet周期帧实例解析