• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. HSAcontrols

    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
    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 10
    • Best 0
    • Controversial 0
    • Groups 0

    HSAcontrols

    @HSAcontrols

    0
    Reputation
    280
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    HSAcontrols Unfollow Follow

    Latest posts made by HSAcontrols

    • RE: Modbus Polling + Meta Points + Memory Leaks

      Thanks Terry, I will send through some more logs hopefully they may contain more detail.

      posted in Development general discussion
      H
      HSAcontrols
    • RE: Modbus Polling + Meta Points + Memory Leaks

      I assume you are running 2 publishers on the same port with different slave IDs?

      Two publishers each on port 502, different Slave IDs.

      I would expect some blocking to occur but it should only be temporary in this case. Can you confirm this or is this deadlock that does not go away?>

      Please see the screenshot – after being left to run it locks up and runs out of memory.

      1. How many points are being published on each publisher

      Each publisher has about 60 Points.

      1. How frequently are the published points being updated

      The original was updating at 5 minutes for the one publisher, and 1 second for the other.

      1. What type of points are the queues growing for? All Meta points or various data source types?

      Various points types have growing queues - meta, modbus IP & virtual

      1. Is the publish attribute changes setting checked on either publisher?

      No, but the update event is set to all.

      1. Are you seeing any events raised for the publishers?
      • The publisher queue has exceeded x entries
      • In the logs I have previously seen a publisher slave error message.
      1. What are the meta scripts doing? Is it possible that you are setting a published point's value that is a context point on another meta point that is then setting the value on that same published point effectively triggering a loop?

      The Meta Points perform basic statistical calculations i.e. min max std average. The one publisher publishes these points and the raw value they were calculated from, which would be the context point for the calculated value.

      1_1574384296645_Thread.PNG 0_1574384296645_3Blocking.PNG

      posted in Development general discussion
      H
      HSAcontrols
    • RE: Modbus Polling + Meta Points + Memory Leaks

      After spending more time replicating the fault, and changing a range of settings it looks like when either of the two Modbus Publishers are enabled these queues start to build up. Once disabled the queues empty.

      I am not sure if this is similar to what was discussed here ? Similar memory issue problem cropping up.

      Watching the threads when the publishers are enabled I get 1-2 threads registering as blocked such as:

      thread pool-12-thread-2
      
      java.io.BufferedInputStream.available:409
      com.serotonin.modbus4j.sero.messaging.InputStreamListener.run:91
      com.serotonin.modbus4j.sero.messaging.StreamTransport.run:63
      java.util.concurrent.ThreadPoolExecutor.runWorker:1149
      java.util.concurrent.ThreadPoolExecutor$Worker.run:624
      java.lang.Thread.run:748
      
      thread pool-12-thread-4
      
      java.io.BufferedInputStream.available:409
      com.serotonin.modbus4j.sero.messaging.InputStreamListener.run:91
      com.serotonin.modbus4j.sero.messaging.StreamTransport.run:63
      java.util.concurrent.ThreadPoolExecutor.runWorker:1149
      java.util.concurrent.ThreadPoolExecutor$Worker.run:624
      java.lang.Thread.run:748
      
      posted in Development general discussion
      H
      HSAcontrols
    • RE: Modbus Polling + Meta Points + Memory Leaks

      Hi Joel,

      I have send through log files via the support email.

      I have found on the systems I disabled the Meta points, the medium priority queues aren't building up/not there at all. The queues were predominantly point events, is it normal for a meta point to generate a queue like this when executing a script?

      posted in Development general discussion
      H
      HSAcontrols
    • Modbus Polling + Meta Points + Memory Leaks

      Hi All,

      In our MangoHTS application we actively poll several Modbus Data sources. Some of these data points are processed within a scripted meta point - then a subset of polled data points and calculated meta points are passed to 1 of 2 Modbus publishers. There are a set virtual points as well, which are used to read/write setpoints via one of the publishers.

      I have found after a several hours the Mango stops polling on all Modbus data sources, and the publishers lock up. I looked through forums reporting similar issues and looked through some of the recurring sources of error:

      I found that JVM free memory went from ~1800MB on startup to less than 300MB in about 4 hours, physical memory also declined to about 100MB. At this point JVM free memory jumped up to 800MB but physical memory remained at 100MB and continues to decline. I have taken a look at thread counts and queues and found that there does seem to be a build up of medium priority queues - so potentially a poorly configured Meta point is causing this?

      I have 4 mangoHTS devices running the same program, one which I have left in a locked up state for comparison, another I have rebooted to log the memory deterioration etc. The other two I am leaving to run with either the publisher or Meta point source disabled, hopefully to narrow down the source of the fault.

      I have attached charts and a capture of the queues - please advise best way forward to diagnose this problem, or any fixes. Thanks!

      2_1574061864456_Queue.PNG 1_1574061864456_PhysicalMemory.PNG 0_1574061864455_jvmFreeMemory.PNG

      posted in Development general discussion
      H
      HSAcontrols
    • RE: Mango HTS Dual Ethernet (Individually Addressable)

      Thanks for the support guys. I was able to configure the bridge permanently and successfully by following the second link you provided.

      For anyone else looking to do this, you should also see within the Mango System Settings/ESconfiguration the newly configured bridged in the network settings once the network config file has been saved & mango rebooted.

      Also if you are new to dealing with linux without a gui, the network configuration file editor (vim) is a little clunky. i allows you to insert edits, then to save and exit use the command :wq. To exit the editor without saving just use :q.

      posted in Development general discussion
      H
      HSAcontrols
    • RE: Mango HTS Dual Ethernet (Individually Addressable)

      So what I'm trying to achieve is to have one Ethernet port connected to a HMI which will poll data from a publisher, and the other port be used for communicating with another device.

      I was intending to allocate a different IP address to each of the ports such that I did not require additional ports on a switch ,

      At the moment as described above, I have set different addresses for enp1s0, and ensp2s0. I have only been able to ping them from connecting to ethernet port 1. The device does not respond to pings on port 2.

      posted in Development general discussion
      H
      HSAcontrols
    • Mango HTS Dual Ethernet (Individually Addressable)

      Hi,

      The HTS hardware has dual Ethernet ports, and within the system settings, there are two configurable network addresses.

      When I configure both as unique Static IP address i.e. enp1s0 is 192.168.0.100 and enp2s0 is 192.168.0.101 both are only accessible through one of the Ethernet ports.

      Is my assumption wrong that you can address the ports separately, or is there more to it?

      Thanks.

      posted in Development general discussion ethernet enp1s0 ip address hts network
      H
      HSAcontrols
    • RE: Standard Deviation Calculation - Meta Data Point Error

      Thanks guys, appreciate the help. Managed to get it all working, the error handling was definitely a good call.

      posted in Scripting general Discussion
      H
      HSAcontrols
    • Standard Deviation Calculation - Meta Data Point Error

      Recently I successfully implemented the basic statistical calculations (min/max/average) by creating a Meta data source, scripting the data-point and then publishing via Modbus.

      I have had some difficulty putting together a script for calculating the standard deviation. The system returns a black question mark diamond icon as a data point place holder, and continues to fill the historical values table unlike when there is a bad/no data source. I am not sure whether the error icon is indicative of NaN, out of range, etc (new to mango).

      I tested the script incrementally and only towards the end of the calculation does this error occur, maybe a problem with the division & square root being to small?

      If anyone could provide clarification on this error icon, or point me towards the right documentation section that would be very helpful!

      Thanks!

      Script is below:

      var average     = p6167.past(MINUTE, 5).average; //Get Average 
      var valueArray  = p6167.last(300);              //Get Last 300 Points(5 min)		
      var Power_StdDev = 0;                           //reset std devation
      			
          for (var i=0; i<300; i++){                  //loop through points 
              var value_i = valueArray.get(i).value;	//get array(i) value     
              var DiffSquared = (value_i - average)^2;    //take the diff & square
              var sumDiffSquared = DiffSquared + sumDiffSquared;       //sum of squares 
              var sumDiffSQuotient = sumDiffSquared/299;                    // divide by n-1
              Power_StdDev = Math.sqrt(sumDiffSQuotient);                  // set std to calculated value
          }
      return Power_StdDev;                   // return to numeric meta data point
      
      posted in Scripting general Discussion statistics calculations meta datapoint error
      H
      HSAcontrols