First link it's how to get client IP, not PLC IP. Besides, I know how to get PLC IP, I need to set it.
Second link it's about Ethernet/IP, but I need info how to set settings for common Ethernet adapter (IoDrvEthernet).
In more detail: I see properties IoDrvEthernet.IPAddress and IoDrvEthernet.IPAddressConfigured, but I don't know is it possible to use it for my task and which one I should used (if first answer yes). I also can't test it right now.
I would be to happy hear some comments from Edwin or Marcel, if they find time in this last pre-holiday days.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. In FAQ there is nice manual how to change Modbus TCP Slave network settings from IEC-code:
https://faq.codesys.com/display/CDSFAQ/ ... IP+Address
Is this same way to change Ethernet adapter settings? (IP, mask, gateway)
I mean, settings for component IoDrvEthernet.
more posts ...
In this exemple you should find how to get it (may be the same lib to set it): l viewtopic.php?f=23&t=6247&p=13230#p13503 l
this post states that it should be implemented yet : l viewtopic.php?t=7577#p17180 l
Thanks for intention to help, but...
First link it's how to get client IP, not PLC IP. Besides, I know how to get PLC IP, I need to set it.
Second link it's about Ethernet/IP, but I need info how to set settings for common Ethernet adapter (IoDrvEthernet).
In more detail: I see properties IoDrvEthernet.IPAddress and IoDrvEthernet.IPAddressConfigured, but I don't know is it possible to use it for my task and which one I should used (if first answer yes). I also can't test it right now.
I would be to happy hear some comments from Edwin or Marcel, if they find time in this last pre-holiday days.
Hi,
sure, you need to enable it in you config file:
example:
/etc/CODESYSControl_User.cfg
[SysSocket]
Adapter.0.Name="eth1"
Adapter.0.EnableSetIpAndMask=1
then in the application:
You could ( for testing purpose) add the ethernet connector and enable the change..
Sure later you do this by iec code.
BR
Edwin
Thank you, Edwin, and wish a nice holidays. Will try it.
Also vote for CDS-63965 as more simple way.
It is important to know that the Ethernet adapter must be configured for static IP addressing.