• H
    hayden_AUS

    I separated the Pump control meta point (shown way at the top of thread) into two meta points,
    one for solenoids and one for other switching.

    Set both to "Update"

    Both working fine without errors.

    ????? Sheech, what an ordeal.

    posted in User help read more
  • H
    hayden_AUS

    Just tested on my ES using virtual points and works fine;
    The Meta point switches off after the advanced scheduler goes inactive.
    The Meta point is set to "change"

    There must be issues with the free instance I am using...

    Any ideas how to fix, or do I have to re-build the instance?

    posted in User help read more
  • H
    hayden_AUS

    Hi Fox/Phil.

    I tried a scripted data point first, but ran into the same issues.

    I have no other global scripts running now, no scripted data sources. There are no alphanumeric data points in the instance.

    I'll try creating the same issue on another instance.

    In relation to scripting, in event handler, where you set external context points, is the key variable name what would be used if creating a scripted data point?

    posted in User help read more
  • H
    hayden_AUS

    Hi guys,

    I am still having issues with this.

    Issue1: Returns "error could not convert to Binary".
    Issue2: Meta point will not go false after Advanced scheduler activation.

    I have checked all data points in the script, and made sure they are all binary.

    When I have the Meta point set to "Change":
    Manually setting a solenoid to TRUE, sets the Meta point to TRUE
    Manually setting the solenoid to FALSE, sets the Meta point to FALSE
    Setting the Solenoid to TRUE via an Advanced scheduler>virtual point>point link>solenoid sets the Meta TRUE
    Setting the Solenoid to TRUE via an Advanced scheduler>virtual point>point link>solenoid does NOT set the Meta FALSE

    When I have the Meta Point set to "Update":
    Manually setting a solenoid to TRUE, sets the Meta point to TRUE
    Manually setting the solenoid to FALSE, sets the Meta point to FALSE
    Setting the Solenoid to TRUE via an Advanced scheduler>virtual point>point link>solenoid sets the Meta TRUE
    Setting the Solenoid to TRUE via an Advanced scheduler>virtual point>point link>solenoid DOES set the Meta FALSE
    However returns an error when going TRUE:
    'Meta': Script result type error in point "Meta - Pump control": Could not convert result "PointValueTime(true@2019/09/05 11:00:37.543)" to Binary

    I have also changed my script with relation to the else statement so that if ALL are false:

    if (p84.value === true || p45.value === true || p48.value === true || p50.value === true || p51.value === true || p52.value === true || p53.value === true || p54.value === true){
        return true;
    	}
    else if (p84.value === false && p45.value === false && p48.value === false && p50.value === false && p51.value === false && p52.value === false && p53.value === false && p54.value === false){
    	return false;
    	}
    

    Also just got another error appear:
    'Meta': Script result type error in point "Meta - Pump control": Could not convert result "PointValueTime(false@2019/09/05 11:26:13.583)" to Binary

    There were no context point changes.

    Only happens when I have the Meta point set to Update.

    posted in User help read more
  • H
    hayden_AUS

    I had to change Mango machines on this site, so ended up doing an "export" then "import".

    I think for some reason the Meta point did not like one of the points having a binary point rendered as "ON and OFF", which was imported from the old machine.

    Once I changed this back to true/false, it worked OK. I then changed it back to ON/OFF and still works.

    Seriously spent a couple of hours on this.

    I did also try the 0/1 as well in the script, didn't work.

    The script always validated.

    Did my head in, but working now.

    posted in User help read more
  • H
    hayden_AUS

    Hi,

    Have an issue with a basic meta point that returns an error:
    0_1567466414177_error.JPG

    Here is the point, just a basic meta script:
    0_1567466457101_point.JPG

    The script is:

    if (p48.value === true || p50.value === true || p51.value === true || p52.value === true || p53.value === true || p54.value === true || p67.value === true || p45.value === true){
        return true;
    }
    else{
        return false;
    }
    

    Weird thing is that a similar script works on another instance.

    H

    posted in User help read more
  • H
    hayden_AUS

    Hi all,

    Some of you already would have a calculator like this, but for those who don't, here is an HTML app I wrote to scale data points in Mango.
    Just copy all the code, and save it as "scaler.html", or some other name. Then double click to open in browser.

    Must have for adding analog data points to Mango.

    H

    <!DOCTYPE html>
    <html>
    	<script>
    		function calculate()
                {
                var outMax=document.getElementById("outMax").value;
    			var outMin=document.getElementById("outMin").value;
    			var inMax=document.getElementById("inMax").value;
    			var inMin=document.getElementById("inMin").value;
    			var testVal=document.getElementById("testVal").value;
    			var rate = ((Number(outMax)-Number(outMin))/(Number(inMax)-Number(inMin)));
    			var offset = (Number(outMin) - (Number(inMin)*rate));
    			var testOutput = ((Number(testVal) * rate)+ offset);
    			document.getElementById("rate").innerHTML = "Multiplier = " + rate;
    			document.getElementById("offset").innerHTML = "Offset = " + offset;
    			document.getElementById("testOutput").innerHTML = "Test Output = " + testOutput;
                }
    	</script>		
    	<body>
    		<div>
    			<table style="color:white;" bgcolor="#00004d">
    				<tr>
    					<td style="font-size:200%" colspan="2">DATA POINT SCALER</td>
    				</tr>			
    				<tr>
    					<td>Output Maximum Value: </td>
    					<td><input type="number" id="outMax" value="100" onchange="calculate"();></td>
    				</tr>
    				<tr>
    					<td>Output Minimum Value:</td> 
    					<td><input type="number" id="outMin" value="0" onchange="calculate"();> </td>
    				</tr>
    				<tr>
    					<td>Input Maximum Value:</td>
    					<td><input type="number" id="inMax" value="65535" onchange="calculate"();> </td>
    				</tr>
    				<tr>
    					<td>Input Minimum Value:</td>
    					<td><input type="number" id="inMin" value="0" onchange="calculate"();> </td>
    				</tr>
    				<tr>
    					<td>Input Test Value:</td>
    					<td><input type="number" id="testVal" value="23456" onchange="calculate"();> </td>
    				</tr>
    				<tr>
    					<td colspan="2" style="text-align:center;"><button type="button" style="font-size:165%;" onclick="calculate()">CALCULATE</button></td>
    				</tr>
    				<tr>
    					<td colspan="2" id="rate">Multiplier - Click Calculate Button</td>
    				</tr>
    				<tr>
    					<td colspan="2" id="offset">Offset - Click Calculate Button</td>
    				</tr>
    				<tr>
    					<td colspan="2" id="testOutput">Test Output - Click Calculate Button</td>
    				</tr>
    			</table>
    			<p id="rate"></p>
    			<p id="offset"></p>
    			<p id="testOutput"></p>
    		</div>
    	</body>
    </html>	
    

    posted in How-To read more
  • H
    hayden_AUS

    Thanks for the reply Fox.

    I understand that it is possible (more that one way), however you point about the USER being able to do this easily is what I am suggesting.

    There is also the angle of NOT having the user do it, but PAYING us to do it. Probably makes financial sense for a return on our time learning this platform.

    posted in Wishlist read more
  • H
    hayden_AUS

    Hi IA crew,

    Is it possible, and do you think it would be of an advantage to have the ability to set more than just one Target point in the Set Point TAB of Event handlers.

    Application example would be irrigation, where it would then be easy to change the zones that come on for the times set in Advanced Scheduler.

    Hayden
    AU

    posted in Wishlist read more
  • H
    hayden_AUS

    Thanks Jared, you guys are awesome!

    Great response time, much appreciated.

    posted in User help read more
  • H
    hayden_AUS

    Got it, I'm used to the V2 interface, thanks.

    posted in User help read more
  • H
    hayden_AUS

    Hi Craig,

    You don't know where I can find out more about "Keys".

    I see reference in Event handlers, as well as the scripting data source.

    Haven't had to use them before. No mention in the scripting help.

    posted in User help read more
  • H
    hayden_AUS

    Thanks Craig, That's what I have already been doing, except I drag from the Basic Components section.

    Anyways, thanks for the help, I will wait to see if IA do a fix, or just keep doing the two elements.

    posted in User help read more
  • H
    hayden_AUS

    Where do you use Label?

    I added label to be "NAME' like in the Point Value Element, it didn't work.

    <ma-switch id="c7d1c0f3-cf43-489c-a51c-719830aba9cc" style="position: absolute; left: 0px; top: 0px;" point-xid="DP_e73a38ec-004f-447c-b527-90d7ef73c6ec" label="NAME"></ma-switch></ma-switch>
    

    posted in User help read more
  • H
    hayden_AUS

    The "Point Value" element, there is an attribute "label", where you can choose "NAME".
    I think IA could add this to the other elements such as "Binary Switch Button" to avoid
    the extra step to name using code.

    posted in User help read more
  • H
    hayden_AUS

    Thanks FOX, just thought I should be able to do it using the drag and drop method.

    posted in User help read more
  • H
    hayden_AUS

    Craig,

    When I simply drag a "Binary switch button" and label it in "text and font", this is the code
    that is generated:

    <div class="ma-designer-root" style="width: 1366px; height: 768px; position: relative;" id="b4938982-c168-42f1-b9f2-701c51d0b541">
        <ma-switch id="c7d1c0f3-cf43-489c-a51c-719830aba9cc" style="position: absolute; left: 0px; top: 0px;" point-xid="DP_e73a38ec-004f-447c-b527-90d7ef73c6ec">Yellow inlet valve</ma-switch>
    </div>
    

    When I save and view the page, the text is gone.

    I just want to keep this simple, so either automatically naming the point or naming it some other way.

    posted in User help read more
  • H
    hayden_AUS

    Hi,

    When I add a point value for instance, in dashboard designer,
    it does not show the point name, I have to add another text box
    to label it. I have tried adding the name to text and font, but the
    text disappears after a save.

    I must be missing something simple..

    Please

    posted in User help read more
  • H
    hayden_AUS

    Hi,

    What would be the best way to set multiple points from ONE Event Handler?
    I want to activate more than one valve from the Advanced Scheduler.

    On the set point TAB, is is only possible to set ONE point. Do I have to run script?
    There is no clarification in the help file on this or external context points.

    Hayden
    AU

    posted in User help read more
  • H
    hayden_AUS

    OK thanks Phil, will do some experimenting.

    posted in Mango Automation general Discussion read more