I am currently trying to programmatically read the frame statistics from a Profinet adapter for evaluation purposes. (That would be pretty much what you get if you double-click on a Profinet controller or device in the IDE, change to the βStatusβ tab, and expand the node βEthernet Statistic.β)
So far, I tried to utilise the SysEthernetGetMediaCounters and SysEthernetGetInterfaceCounters functions from SysEthernet. However, to no avail: The result code is 16#0C in both cases, which should map to ERR_NOTIMPLEMENTED if I am not mistaken. I suspect those functions are either a stub (which would explain why the would not show up in the online help) or they are expecting the MAC address of the interface in an order that I cannot fathom. Code example for reference:
So far I have been greatly unsuccessful in finding adequate functions or function blocks in either CommFB or any of the relevant Profinet libraries. So I would be thankful for any pointers. I would be perfectly content with the number of sent and received frames, btw.
Last edit: sho 2020-09-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am currently trying to programmatically read the frame statistics from a Profinet adapter for evaluation purposes. (That would be pretty much what you get if you double-click on a Profinet controller or device in the IDE, change to the βStatusβ tab, and expand the node βEthernet Statistic.β)
So far, I tried to utilise the
SysEthernetGetMediaCounters
andSysEthernetGetInterfaceCounters
functions fromSysEthernet
. However, to no avail: The result code is16#0C
in both cases, which should map toERR_NOTIMPLEMENTED
if I am not mistaken. I suspect those functions are either a stub (which would explain why the would not show up in the online help) or they are expecting the MAC address of the interface in an order that I cannot fathom. Code example for reference:So far I have been greatly unsuccessful in finding adequate functions or function blocks in either
CommFB
or any of the relevant Profinet libraries. So I would be thankful for any pointers. I would be perfectly content with the number of sent and received frames, btw.Last edit: sho 2020-09-14