Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Codesys Soft PLC connection to TOP OPC UA- Server

uemit
2021-03-22
2021-03-22
  • uemit - 2021-03-22

    Hello together,

    Im currently working on a Project in Codesys using the integrated Soft PLC. I want to connect the Soft PLC to the TOP OPC UA- Server. The variables that I used in the Codesys program are already visible in the "Adress Space" in the UA Expert- Client that I use. And when I change the value of a variable in the UA Expert- Client then this change is also visible in the Codesys programm and vice-versa. When I click on "Log in" and then "Run" in Codesys, the "Modbus_TCP Slave Device" on the left side in Codesys is marked with a red tri- angle and not a green circle. What does this red tri- angle mean? I believe, it has to do something with the configurations of the "Modbus_TCP Slave Device". I tried to do diffenrent configurations with the Slave- Device, but the result is always the same. The red tri- angle doesnt go away. In the following you will see some screen- shots.

    Greetings and thank you for your time

    Uemit

     
  • i-campbell

    i-campbell - 2021-03-22

    Here is the list of all the status icons. https://help.codesys.com/webapp/_cds_device_tree_device_editor;product=codesys;version=3.5.16.0
    In your case I see it is an orange triangle and not a red triangle.
    This happens when your modbus slave (CODESYS PLC) is configured correctly, but no Modbus Master has opened a connection to your slave.
    To get him to the two-green-arrows-arranged-in-a-circle status, you will need to connect your master.

    TIP: The modbus spec says you should use Unit-ID 0xFF for a Modbus TCP slave. 0x00 (broadcast address) also works.

     
    • uemit - 2021-03-22

      Thank you for your answer. I watched a video where someone was able to connect the Soft PLC to the TOP OPC UA Server without a master. I will send the link in the following. But I will try to implement your advice. Because when I dont use a master Im not able to give a Unit-ID to the slave device and also not an IP Adress.

      https://www.youtube.com/watch?v=cOr08a8JuMY&t=18s

       
    • uemit - 2021-03-22

      Thank you very much for the answer today. After today I know that I always have to connect the slave device to a master device. And thanks a lot for the information about the Unit- ID. That was certainly important. I also found a list on wikipedia regarding the standard ports for the different protocols. You can see the link in the following. Without a master its not possible to specify the port or Unit-ID and other relevant aspects of the slave device.

      https://de.wikipedia.org/wiki/Liste_der_standardisierten_Ports

      Greetings

      Uemit

       
    • uemit - 2021-03-22

      So currently the green circle appears left to the Modbus_TCP_Slave. But it turns into a red tri- angle after a while. When I do a rightklick on the Slave and choose diagnosis then it works for about 2 minutes until the red tri- angle appears again.

       

      Last edit: uemit 2021-03-22
  • i-campbell

    i-campbell - 2021-03-22

    Hi uemit. You seem to be muddling your clients /servers and modbus/opc ua

    So. Do you mean the TOP-Server OPC UA Client? Because the symbol configuration you have made is intended for using the PLC as an OPC UA Server.

    My feeling is.. you do not need modbus in your project at all.

    For configuring the TOP-server OPC UA Client, start at page 15 of this document. https://support.softwaretoolbox.com/app/answers/detail/a_id/2450

    For configuring codesys soft PLC as an OPC UA Server, i think you have already done this. Just delete the modbus device entirely from your project.

     

Log in to post a comment.