Change IP for profinet slave without topology losing

asivakov
2020-12-10
2020-12-14
  • asivakov - 2020-12-10

    Hello!
    I got fully configured Pi as profinet-master and some profinet slave connected to it. Now I need to change IP-addresses to migrate on other subnet. I don't want to update the project, but can I do it from program code?
    So far, I can change IP of master using linux terminal (ifconfig), and IP with name of slave device by DCP_set functional block. Changing only the Master IP-address, all functioning fine, but when changing slave IP - topology is ruined and connection is lost.

     

    Last edit: asivakov 2020-12-10
  • asivakov - 2020-12-14

    OMG! I did it!
    So:
    1. You need to disable slave node and master by "NodeName.Enable := FALSE" and calling DED.Reconfigure functional block;
    2. Call desired methods from IoDrvProfinetBase.ControllerConfigUtil functional block (e.g UpdateIPSettings, UpdateStationName, etc);
    3. Enable back master and slave.
    Thats how you can change IP of profinet slave node. Also you can update slave it-self by ProfinetCommon.DCP_Set.

    I can't say, how much it safe enough, but it work's for me =)
    Good luck!

     
    πŸ‘
    3

    Last edit: asivakov 2020-12-14
    • Morberis

      Morberis - 2020-12-14

      Good work, congrats! Also thanks for sharing your solution.

       

      Last edit: Morberis 2020-12-14

Log in to post a comment.