• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Modbus Serial missing configuration options

    Mango feedback
    3
    13
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • terrypackerT
      terrypacker
      last edited by

      I'll make a git issue to review that timeout code. As for Mango 4.0 it will be a paid upgrade but is still months out with no firm release date.

      1 Reply Last reply Reply Quote 0
      • MattFoxM
        MattFox
        last edited by

        Any further new Terry? Trying to establish a timeline for our customer.

        Fox

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        1 Reply Last reply Reply Quote 0
        • MattFoxM
          MattFox
          last edited by

          Have done some more testing for you. The virtual socket is definitely the issue. Sockets are not being disposed of properly during datasource restarts thus causing a lockup. Secondly it's definitely the virtual serial socket that ignores timeout retry settings for modbus. It seems like fixes have been implemented for the serial datasource side but not the modbus... I've checked with a directly connected serial port connected to an ES and sure enough, the retries are spaced apart as stated in my retry settings.

          Hope this helps

          Fox

          Do not follow where the path may lead; go instead where there is no path.
          And leave a trail - Muriel Strode

          1 Reply Last reply Reply Quote 0
          • terrypackerT
            terrypacker
            last edited by

            @MattFox I have been focused on some other development but I haven't forgotten this and will try to find some time to take a look next week.

            1 Reply Last reply Reply Quote 0
            • MattFoxM
              MattFox
              last edited by MattFox

              Thanks, I've continued testing and sure enough, nothing leaves the virtual serial buffer... something is stuck... This affects everything. Serial, modbus, anything that uses the virtual serial port. I need this fixed pronto our whole system revolves around this as it provides excellent real time controls. I cannot go live with my new changes and a freshly upgraded 3.7.7 if all our systems go offline because of it.

              Fox

              Do not follow where the path may lead; go instead where there is no path.
              And leave a trail - Muriel Strode

              1 Reply Last reply Reply Quote 0
              • terrypackerT
                terrypacker
                last edited by

                @MattFox I have just setup a simulation locally and run through the code in detail. The timeouts for Modbus Serial work correctly in my setup. I was also able to connect 2 serial data sources using a similar setup and found no problems.

                Modbus Serial Slave (RTU) <--> Virtual Serial server type (port 1000) <--> Virtual Serial client type (port 1000) <--> Modbus Serial Data Source (RTU)
                

                Here is some I/O log output using an 8s timeout:

                2020/07/16-07:51:11,346 O 010300000002c40b
                2020/07/16-07:51:12,371 I 010304001800007a34
                2020/07/16-07:51:16,346 O 010300000002c40b 
                2020/07/16-07:51:24,350 O 010300000002c40b -- 8s timeout
                2020/07/16-07:51:32,351 O 010300000002c40b -- 8s timeout
                2020/07/16-07:51:35,978 I 010304001800007a34010304001800007a34010304001800007a34
                2020/07/16-07:51:36,348 O 010300000002c40b
                2020/07/16-07:51:37,369 I 010304001800007a34
                2020/07/16-07:51:41,347 O 010300000002c40b
                2020/07/16-07:51:42,377 I 010304001800007a34
                2020/07/16-07:51:46,347 O 010300000002c40b
                2020/07/16-07:51:47,370 I 010304001800007a34
                20
                

                Something worth noting here is the read timeout on the Virtual serial client ports. In my setup I have this setup to 1000ms, and this is why the input I messages are being read every 1000ms. Basically the read will block Modbus 4J on the socket until that timeout passes.

                I am simulating my timeouts by setting a breakpoint inside the Slave to halt its communications. When I play through the breakpoint the data source picks back up where it left off. Hence the multiple messages on the line at 2020/07/16-07:51:35,978

                In order to help you out I will need to know what is different between your setup and mine. Is the socket connection being broken/severed or is the timeout actually due to a delayed response from the Slave? As much detail as you can provide will be helpful.

                Thanks.

                1 Reply Last reply Reply Quote 0
                • MattFoxM
                  MattFox
                  last edited by

                  I wasn't using a timeout on the virtual port. I had it set as a serial server socket, 1024 buffer and 0 timeout. If I used a timeout when it reconnected a boatload of messages flew out of the buffer. It just seems to fill up like a balloon... If I didn't timeout and manually closed and opened connections it would do it also.

                  I can give you a copy of my .net serial program since I use it to translate our radio communications but it hasn't changed since 3.5.6.
                  The 3.5.6 with the same settings has no issues for our serial ports. The modbus however still wouldn't have it...

                  I can email you everything including a connection to our vpn network to test with if it suits.

                  Fox

                  Do not follow where the path may lead; go instead where there is no path.
                  And leave a trail - Muriel Strode

                  1 Reply Last reply Reply Quote 0
                  • terrypackerT
                    terrypacker
                    last edited by

                    @MattFox you better email everything over to support@infiniteautomation.com referencing this thread. I don't seem to understand what you are trying to do using a Virtual Serial Server type port on a Modbus Serial data source.

                    1 Reply Last reply Reply Quote 0
                    • MattFoxM
                      MattFox
                      last edited by

                      Sent an email Terry, it's a start I'm trying to sort some other items to help you with your testing.

                      Fox

                      Do not follow where the path may lead; go instead where there is no path.
                      And leave a trail - Muriel Strode

                      1 Reply Last reply Reply Quote 0
                      • danD
                        dan
                        last edited by

                        I've used Moxa MB3180 RS485 to Ethernet converters quite successfully with Mango instances if that's of any help.
                        You setup a MODBUS/TCP data source to the Moxa, then plug your RS485 serial into that.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post