• 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

    TCP/IP Data Source examples?

    User help
    3
    11
    3.9k
    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.
    • C
      craig
      last edited by

      Hi Dan,

      I think you need to start with the most basic scenario and work up from there.
      Does the device respond to commands on RS232?

      Does the device respond to commands through the Moxa RS232 to TCP/IP converter? There must be some software out there that talks to this device that you can point at the Moxa. Might need to use the moxa virtual serial port which creates a COM port that redirects to the moxa device over RS232. I've done this on windows and linux before.

      If the existing software for the device can communicate with it through TCP/IP converted to RS232, you can use wireshark to capture the TCP/ip conversation. Then you will have an idea of what you need to send from mango and what response you should get.

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

        Thanks for the info, I'll give that a go and see how we get on.

        Cheers
        Dan

        1 Reply Last reply Reply Quote 0
        • phildunlapP
          phildunlap
          last edited by

          Hi Dan,

          If you're working on a Linux system, using "nc" can be very useful when you're playing with the TCP/IP Data Source. Point the data source as linuxhost:9000, run "sudo nc -l 9000" (-k to keep alive) and let the experiments begin!

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

            ah yes, nc is a great idea. I'll try some tests with that.
            Thanks heaps.

            Cheers
            Dan

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

              the results are interesting...
              when I enable the data source, I get an echo of the read command I put in the data point, which is good, however if I drill down on the data point and press the refresh button it doesn't re-send the packet to the TCP port.

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by phildunlap

                There are a number of data sources who haven't had their forcePointRead method implemented, so that little refresh arrow doesn't do anything. But, I've implemented it in the TCP/IP module, just for you! You can download it through the modules page.

                Don't forget to:

                sudo nc -l 9000 <<< 'Mango is awesome!'
                
                1 Reply Last reply Reply Quote 0
                • danD
                  dan
                  last edited by

                  oh! hahaha! you have no idea how many times I pressed the little refresh button then looked at the other monitor to see if something was happening.. that's hilarious!
                  Thanks for enabling that, I'll download it now.

                  Cheers
                  Dan

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

                    I'm supposed to send this to the controller for it to just report back a bunch of stuff..

                    AA 55 AA 55 AA 55 EB 90 EB 90 EB 90 16 A0 00 B1 A7 7F

                    Is there a data source log I can tail to see the transaction happening? And maybe somewhere to see the data that comes back so I can strip back what I need?

                    Cheers
                    Dan

                    1 Reply Last reply Reply Quote 0
                    • phildunlapP
                      phildunlap
                      last edited by phildunlap

                      Logging can be enabled by adding the line

                      <category name="com.infiniteautomation.tcpip.rt"><level value="debug"/></category>
                      

                      below similar lines in your Mango/classes/log4j.xml file, near the bottom, then either restarting Mango or, if you have log4j-reset installed, by going to your System Settings page in the log4j reset section and reloading the logging configuration. This will output into the normal Mango log file.

                      I'm going to put in a RollingIO log, like Modbus and Serial have, as well as a testing utility and hopefully release it this week. It would make it easier to use, for sure.

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

                        thanks for that I'll give it a go.

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