• A
    andrewh

    Thanks

    Can you please let me know if you have increased the timeout?

    Thanks

    posted in User help read more
  • A
    andrewh

    We have been asked to interface the mango to a system where another computer buffers the data so unfortunately we can’t poll the device directly.

    posted in User help read more
  • A
    andrewh

    Hi

    Can you please let me know what happened with this git issue?
    I'm working on a meta data point that works during a synchronization.

    Thanks

    posted in User help read more
  • A
    andrewh

    I'm running mango 3.5.6

    I have been working on getting meta (calculated) data points (those under a meta data source) working under non-ideal conditions. I have success in using the CONTEXT to determine the timestamp of the update that triggered the script, then using this to look up the value of all points to calculate and setting it as the timestamp of the value being calculated.

    See https://forum.infiniteautomation.com/topic/3632/can-one-tell-which-point-has-triggered-the-context-update/9

    This works for quite well, as long as the publisher is able to buffer the data through any communication delays.
    However, if the data is missed and later is updated by a Synchronize, it appears that the meta point script is NOT triggered. I am aware that it's possible to perform a "Generate History" on the meta data source to calculate values for data that has come through on a synchronize.

    Can you please tell me if there have been any changes in this area in v3.6, or is there a simple way of automating history generation to trigger after data is synchronized?

    posted in User help read more
  • A
    andrewh

    Thanks for the information in this topic. I used it to create the following scripts that seems to work very well in creating a value with the correct timestamp even when one clock is out, there is a delay in one value arriving or even when the data arrives out of order:

    var sampleTime = CONTEXT.getTimestamp();
    var value1 = p1.pointValueAt(sampleTime, true);
    var value2 = p2.pointValueAt(sampleTime, true);

    LOG.info(sampleTime);
    LOG.info(value1);
    LOG.info(value2);

    // If both points have a value at this time, then calculate and record it
    if ( (value1 !== null) & (value2 !== null)) {
    LOG.info('Saving data');
    TIMESTAMP = CONTEXT.getTimestamp(); //sampleTime;
    var valueCombined = (100*Number(value1.value)) + Number(value2.value);
    LOG.info('Logging ' + valueCombined + ' at ' + TIMESTAMP);
    return valueCombined; // This is a string
    }
    else { // This is the first point value received for this time
    // The combined value will be calculated when the value for the other point
    // triggers this script
    return UNCHANGED;
    }

    This works well even if the publisher can't publish for a couple of days and buffers the data.
    It anyone has any suggested improvements, please let me know.

    One thing I have discovered is that if the data has trouble getting through, and the buffer fills up or is reset for some reason and the data comes through in a synchronization, then the script is NOT called, so the meta point is NOT calculated. I know it's possible to perform a manual "Generate History" on the meta data source. Does anyone know a good way to automate this to calculate meta points after a synchronize?

    posted in How-To read more
  • A
    andrewh

    Thanks Craig

    The device we are polling is TCP. Why do you ask - do you have an idea?

    posted in User help read more
  • A
    andrewh

    Hi

    We are using v3.5.6
    We are looking at reading values from a PC that sits between mango and the end devices and buffers the data. So the mango will read values and timestamps from modbus registers on the buffer PC. I have worked how to read values into a modbus data point and have a separate data point in a meta data source that includes a script that sets the timestamp of the secondary data point (the meta one).
    I'm wondering if it's possible to achieve this without having to create the meta data point. ie set the timestamp of the modbus data point when it's read.

    Thanks
    Andrew

    posted in User help read more
  • A
    andrewh

    This is working now. I think the main issue was simply that 'DHCP' needs to be upper case. Other things I noticed were that the script takes about 1 minute to complete, the LED's do NOT go off (even after about an hour) and the mango needs to be rebooted (it does not need a reboot when changing to a fixed IP address).

    posted in Mango feedback read more