Skip to content

Modbus TCP and Comsiemens Library

Hi engineers, I am researching about communication between siemens s7-1200 with AXC F 2152, I refer to it and see that there is a support library like Comsiemens, but on the Modbus TCP side, I still can't connect, can you help me , as long as the two devices communicate with each other , thank you very much .

Comments

  • Hi, if the objective is to exchange data between the two devices by any means, then the simplest solution is probably to use Profinet. The AXC F 2152 can act as either a Profinet Controller or a Profinet device, and I understand that the S7-1200 can do the same. You will need to nominate one device as the controller, and one as the device. If you choose the S7-1200 as the controller, then you can import the GSDML file for the AXC F 2152 (available for download on the Phoenix Contact website) into the Siemens configuration software (TIA Portal?). After completing the Profinet setup you will be able to exchange data with the AXC F 2152 using the global variables PND_S1_OUTPUTS and PND_S1_INPUTS in the AXC.
    It might also be possible to use Modbus TCP or the ComSiemens library, but these involve additional libraries and configuration, so Profinet is probably a simpler solution.
  • Thank Martin !
    I plan to use AXC F 2152 as a server, give commands to siemens, and siemens send signals, according to my understanding, if I use the COMSIEMENS library, is it correct to use the PUT/GET function on siemens? And if so, i will import the siemens GSDML file into PLCnext Engineer ?,i think not because I couldn't find this file of s7-1200, thank you very much.
  • If you're using the ComSiemens library, I don't think you need to do anything on the Siemens side to support this.
    The ComSiemens library does not use GSDML files - those are only needed for Profinet communications.
    You will need to ask Siemens where to get a GSDML file for an S7-1200, if you want this. From memory you need to generate a custom GSDML file depending on the configuration of the S7 system.
  • I asked my seniors, but they have never downloaded the GSDML file of the s7-1200 and have almost no exposure or experience with it, i think Profinet case is impossible, so I would do with the Comsiemens library, do you have a little example so I can learn and follow? , my case AXC F 2152 is almost the server and give a command for s7-1200.
    I sincerely thank .
  • The documentation for that library has information on how to use the function blocks.
    (I see now that the documentation says that GET/PUT access might need to be enabled for an S7-1200).
    The first thing to check is that you can esablish a connection to the S7 using an instance of the CoSi_ETH_S7_Link function block, i.e. that the xConnected output goes TRUE when the xConnect input is set to TRUE.
    If you get that working, you can try toggling the xReadRequest input to read data from the specified area of the S7.
    If you get stuck at any point, or if anything in the documentation is not clear, you can ask for help from the library developers using the Contact button on the product page in the PLCnext Store.
  • Out of interest, Page 22 of this document describes how to generate the GSDML file for an S7-1200 PLC:
    https://support.industry.siemens.com/cs/attachments/101495058/101495058_S7-1200_PN_DP_Gateway_DOC_v11_en.pdf
  • From the bottom of my heart, thank you ! Have a good day .
  • edited January 2022
    271946772_3139479949616770_8810784010833544404_n.png?_nc_cat=106&ccb=1-5&_nc_sid=ae9488&_nc_ohc=CJ6pJVBos-YAX8kilUt&_nc_ht=scontent.fdad3-5.fna&oh=03_AVKNgnEfes1hDnBM5ZYxo8BwuB3K09eL2LkyqU4qTeiZqA&oe=6218E8E9

    I don't know how to login proficloud to ask the programmer, but I have a card with a UUID code, please help me with this problem, I don't know what the string is here, how can I enter the IP, I have determined value is cosi_string15, can you suggest me ? 272066177_1639949119680155_6667033194893958950_n.png?_nc_cat=105&ccb=1-5&_nc_sid=ae9488&_nc_ohc=_OrV9HiKdcoAX8DLFfi&tn=VY6P59GIGknuPp4c&_nc_ht=scontent.fdad3-4.fna&oh=03_AVJ5oAyatGx9DpeGb4ZqJDZr-WVh-sWxvNb-2-gGPF1icg&oe=62195C7C
  • I see this question has also been asked in a couple of other places over the weekend, so I hope the answers there helped with this issue.

    You need to assign the IP address of the Siemens PLC to the "address" variable. If you need help with that, it would be worth getting in touch with your local Phoenix Contact office, who can help you get started with PLCnext Engineer programming.
  • Thank you, I did it myself.
Sign In or Register to comment.