But how I can use it for POU from Device Tree? (for example, for Ethercat master device)
Can you give me a little example?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2017-06-23
Originally created by: KevinR
Hello e.kislov,
This is what I've found out after some research:
The information for the device is read from the device description (dd) file. In the dd file, there can also be specified text translation for the info section. So I think, this text is not loaded to the runtime.
After some deeper analysis, I've found out that the EtherCat_Master is extending the "IoDrvBase". This FB implements the interface "ICmpIoDrv" with a method called "IoDrvGetInfo". The method requires a "Pointer to Pointer to IoDrvInfo". The structure "IoDrvInfo" includes the var "szFirmwareVersion", which seems to be the same as in the information tab.
If the driver is implementing the interface "ICmpIoDrv", this might be a quick and dirty solution to read the version. But I don't know if the information is valid.
See the attached screenshots below, there is also a example code for the EtherCat_Master instance.
Please let me know if there is a better way, which works for all devices
BR,
KevinR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But, to say honestly, it's not solve my problem.
I say about "Ethercat Master" as example.
Yes, "IoDrvGetInfo" works for Ethercat Master, but it gives incorrect version for Modbus Master (3.0.0.0 instead real 3.5.10.3).
Furthermore, it not works for Modbus COM, Modbus Slave, Ethercat Slave, etc. (I also check method GetDeviceInfo, but it does not contain device version).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. I need to get data about some POUs from Device Tree (data from tab "Information) in PLC program.
Something like that:
Is this possible?
Edwin, I call on you to help.
Hi,
SysTarget.library...
BR
Edwin
Thanks, it works for device (PLC).
But how I can use it for POU from Device Tree? (for example, for Ethercat master device)
Can you give me a little example?
Originally created by: KevinR
Hello e.kislov,
This is what I've found out after some research:
The information for the device is read from the device description (dd) file. In the dd file, there can also be specified text translation for the info section. So I think, this text is not loaded to the runtime.
After some deeper analysis, I've found out that the EtherCat_Master is extending the "IoDrvBase". This FB implements the interface "ICmpIoDrv" with a method called "IoDrvGetInfo". The method requires a "Pointer to Pointer to IoDrvInfo". The structure "IoDrvInfo" includes the var "szFirmwareVersion", which seems to be the same as in the information tab.
If the driver is implementing the interface "ICmpIoDrv", this might be a quick and dirty solution to read the version. But I don't know if the information is valid.
See the attached screenshots below, there is also a example code for the EtherCat_Master instance.
Please let me know if there is a better way, which works for all devices
BR,
KevinR
Hi, KevinR.
Thanks for interesting information.
But, to say honestly, it's not solve my problem.
I say about "Ethercat Master" as example.
Yes, "IoDrvGetInfo" works for Ethercat Master, but it gives incorrect version for Modbus Master (3.0.0.0 instead real 3.5.10.3).
Furthermore, it not works for Modbus COM, Modbus Slave, Ethercat Slave, etc. (I also check method GetDeviceInfo, but it does not contain device version).