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

Broadcast IP-packet over UDP from WAGO 750-881

2015-08-24
2015-08-30
  • techkarlsson - 2015-08-24

    My level of knowledge about communication over ethernet is not very high so please bare with me.

    We have a 750-881 with som I/O-modules and what we are trying to achieve is to broadcast about 10 I/O-statuses on the network.
    A couple of other units (one server and one ethernet-microcontroller) are also in the network and these are the units that needs the I/O-status.
    For a while we ran the FB called "ETHERNET_MODBUSMASTER_UDP" from WAGO and transmitted a MODBUS message containing the information. The IT guy was able to "sniff" the data and further handle it in the system.
    The main issues with this was that it seems like our data from the PLC "changes positions" so the server needs to be reconfigured time to time. There will also be an issue when connecting the microcontroller since its not programmed for MODBUS-communication.

    What I would like to do is to broadcast one packet over UDP, a couple of times a second, which contains the I/O-data and the I/O-data should have static positions within the packet.

    Is the ethernet.lib the correct way to go and simply use the "ETHERNET_WRITE" function?

     
  • WAGOKurt - 2015-08-29

    You should be able to use ETHERNET_MODBUSMASTER_UDP, that is contained in WAGOLibModbus_IP_01.lib. This modbus library uses the newer SysLibSockets.lib not the older Ethernet.lib (ModbusEthernet_04).

    Regardless, the modbus registers should not be changing as you explained. I would suspect a programming issue, or something strange in the network configuration.

    Hope this helps!
    -Kurt

     
  • techkarlsson - 2015-08-30

    Hi Kurt, and thanks for your reply.

    The attachment contains a screenshot of how my transmission looks like today.
    The elements in the array called "write_array", are the different variables that we need to get out on the network. What I'd expect is that if I always write the same output to array[1], the same location within the packet would always include the same data. The IT-guy says it doesn't.

    I guess we need to go for the non-modbus version anyway because other units needs the data.
    I checked the SysLibSockets.lib and I assume it is the SysSockSendTo function I'd use to broadcast the buffer?

    IMG: MODBUS_UDP.JPG

     

    Related

    Talk.ru: 1


Log in to post a comment.