Announcement

Collapse
No announcement yet.

Connect to PRC3000 Automation Direct

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Connect to PRC3000 Automation Direct

    I created the Modbus IP entry, and IO get a test connection passed when Test

    I created a few devices, but do not seem to be able to communicate

    The Gateway is Connected
    When I try to write to a coil, I get the following error in the log

    Nov-13 7:27:45 PM
    *
    Modbus Error
    Error in Write: The operation is not allowed on non-connected sockets.
    Nov-13 7:27:45 PM
    *
    Modbus
    Writing Slave: 1 Address: 100 Coil:Bool as 1

    The coil is enabled, and it is not read only.

    I also get an error in reading a register

    Nov-13 7:30:05 PM
    *
    Modbus Error
    I'm not going to poll any remaining registers on this gateway as it seems there is a communication issue.
    Nov-13 7:30:05 PM
    *
    Modbus Error
    Read error for Cur-Mux-In
    Nov-13 7:30:05 PM
    *
    Modbus Error
    Error in Read: Arithmetic operation resulted in an overflow.
    Nov-13 7:30:05 PM
    *
    Modbus Error
    Error in ReadValue: Arithmetic operation resulted in an overflow.





    Should I be doing something else?

    Is there any way to see the value of data reads in the Home view (If I am supposed to see values there, then I am not - so presumably no reads are occurring)

    Thanks


    (I uploaded a log file, where I test the connection, and then set/unset the coil)
    Attached Files
    Last edited by salasidis; November 13, 2017, 08:30 PM.

    #2
    I managed to successfully connect both CAS Modbus Scanner, as well as Simply Modbus TCP Client to the PRC3000, from the same VM computer that HomeSeer is installed in. Just in case, I disabled the Firewall in both directions as well.

    The HomeSeer connection is still not working, is there a way to get a byte transmit receive log (for debug purposes) ?
    Last edited by salasidis; November 13, 2017, 11:49 PM. Reason: Added a line

    Comment


      #3
      I managed to get the reading of Output coils and Reading of 16 bit registers to work OK.

      Float 32 values - not able to get working yet.

      In SimplyModbus TCP, I need to tag

      'High Byte First' ON
      'High Word First' Off

      I will read a value like 32.5

      In the Log for the plugin, I am reading junk values like

      2.71840480071018E+23

      or

      -1.59498855570768E-23


      I have Disable Big Endian Values tagged ON, but it does not seem to make a difference if it is off

      Comment


        #4
        My guess is - and I am waiting for Automation Direct to confirm

        Data is stored in Big Endian (at the word level)

        Floats are stored Low Word first, High word second


        Is that the way they are expected in the plugin?

        Comment


          #5
          This is a worry, I would have thought the big-endian toggle would have been the solution here.

          Can I ask you to try a modpoll poll of your slave and send me the modpoll command line and output that works:
          http://www.modbusdriver.com/modpoll.html
          Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

          Comment


            #6
            Here it is - it reads the right float value


            >modpoll -m tcp -t4:float -r 14 -c 1 192.168.0.195
            modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
            Copyright (c) 2002-2013 proconX Pty Ltd
            Visit http://www.modbusdriver.com for Modbus libraries and tools.

            Protocol configuration: MODBUS/TCP
            Slave configuration...: address = 1, start reference = 14, count = 1
            Communication.........: 192.168.0.195, port 502, t/o 1.00 s, poll rate 1000 ms
            Data type.............: 32-bit float, output (holding) register table

            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.400002
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.700001
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.400002
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.000000
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.400002
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.099998
            -- Polling slave... (Ctrl-C to stop)
            [14]: 34.799999
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.299999
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.000000
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.099998
            -- Polling slave... (Ctrl-C to stop)
            [14]: 35.500000
            -- Polling slave... (Ctrl-C to stop)
            ^C
            Y:\RS_846a\Download Software\Modbus>

            Comment


              #7
              One more thing, If I use a -f in the arguments, it seems I get similar values to what I get with the plugin



              >modpoll -m tcp -t4:float -f -r 14 -c 1 192.168.0.195
              modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
              Copyright (c) 2002-2013 proconX Pty Ltd
              Visit http://www.modbusdriver.com for Modbus libraries and tools.

              Protocol configuration: MODBUS/TCP
              Slave configuration...: address = 1, start reference = 14, count = 1
              Communication.........: 192.168.0.195, port 502, t/o 1.00 s, poll rate 1000 ms
              Data type.............: 32-bit float, output (holding) register table
              Word swapping.........: Slave configured as big-endian float machine

              -- Polling slave... (Ctrl-C to stop)
              [14]: 0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: -107614320.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: 0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: 0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: 271840696243799940000000.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: -0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: 0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: -0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: -0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: 0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: -107614320.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: 0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: -0.000000
              -- Polling slave... (Ctrl-C to stop)
              [14]: 0.000000
              -- Polling slave... (Ctrl-C to stop)
              ^C
              >

              Comment


                #8
                Any ideas on the above - is the endian word flag not doing the job?

                Comment


                  #9
                  Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                  Comment


                    #10
                    Thanks - no problem - I'll test it when you have the new version.

                    Comment


                      #11
                      Any reported progress - its been a while.

                      Comment


                        #12
                        Is this still being worked on - seemed like a simple reversal of the 2 16 bit words.

                        Comment


                          #13
                          Hi sorry, for the delay.another project took me away from HS3 for a while. I'm looking into this and will have a fix for you in the 1st week of Jan.
                          Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                          Comment


                            #14
                            Was the floating point read / write of values fixed in the current plug in?

                            Comment

                            Working...
                            X