• H HSAcontrols

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

    posted in Development general discussion read more
  • H HSAcontrols

    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 read more
  • H HSAcontrols

    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
    thread pool-12-thread-4

    posted in Development general discussion read more
  • H HSAcontrols

    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 read more
  • H HSAcontrols

    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 read more
  • H HSAcontrols

    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 read more
  • H HSAcontrols

    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 read more
  • H HSAcontrols


    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 and enp2s0 is 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?


    posted in Development general discussion read more
  • H HSAcontrols

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

    posted in Scripting general Discussion read more
  • H HSAcontrols

    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!


    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 read more