4 Replies Latest reply on Mar 10, 2016 2:31 AM by khorie RSS
    hshintani Newbie

    Modbus Connectivity

    Hi,

     

    I'm trying to write value from ThingWorx to PLC with modbus protocol. I could connect ThingWorx and PLC.

    But,as a result, the value I overwrote on ThingWorx didn't reflect to PLC like the picture below.

    20160303_1509.PNG

    Which does this problem occur by mistake of programming source-code or setting of PLC?

    If anybody knows the cause and solution, please let me know...

      • Re: Modbus Connectivity
        aanjan Heavyweight Champ

        Hideyuki, just so I understand correctly, you can send the values from the PLC to ThingWorx and it updates, but it doesn't work the other way around? Are you using any simulators?

          • Re: Modbus Connectivity
            hshintani Newbie

            Hi Aanjan,

             

            I could send the value of holding_register in PLC to ThingWorx with modbus function code NO.3.

            And, i try to send set-point value for control system from ThingWorx to PLC with modbus function code NO.6.

            In wireshark, the packet(NO.141) sent from EMS to PLC with modbus function code NO.6 exists as query packet.

            But, PLC send response packet to EMS with modbus function code NO.3.

            I can't understand  why query and response packets use different function codes...

            I use modbus package and siemens PLC.

          • Re: Modbus Connectivity
            khorie Newbie

            Hi Hideyuki,

             

            If I were you, I will try to write modbus register using the other Modbus Master tool to confirm the setup of PLC and IP network connection.

            Also I will use Modbus slave simulator tool in place of PLC and will see if it responds the correct response to the write register command from ThingWorx  modbus package.

             

            This will help you to separate the issue whether the issue is coming from the ThingWorx side or PLC side.

             

            If you do not have favorite Modbus master tool, here is my favorite one.

            http://www.chipkin.com/products/software/modbus-software/cas-modbus-scanner/

            This tool is free of charge and easy to use and powerful for debugging modbus issue.

             

            http://www.plcsimulator.org/

            free Modbus simulator

             

            Kunio

            • Re: Modbus Connectivity
              rpalaniappan Newbie

              Looks like more of PLC issue. Does it work with Modbus Simulator? Or Does writing allowed in Siemens PLC?