• P
    Pikey4

    Thanks for helping out @CraigWeb @phildunlap @Jared-Wiltshire ,

    I couldn't get it to work with a Persistent TCP data on central server, so set up on an ES on Site and it seems to be tracking good. All the 4's and 1's are lining up where I expect them.

    Thanks Again.

    I got this to work:

    var prevVal = p709.lastValue(2);
    var thisVal = p709.lastValue(1);
    var nextVal = p709.lastValue();
    
    if (thisVal >= prevVal && thisVal >= nextVal) {
        // peak
        return 4;
    } else if (thisVal >= prevVal && thisVal < nextVal) {
        // still climbing
        return 3;
    } else if (thisVal < prevVal && thisVal < nextVal) {
        // trough
        return 1;
    } else {
        // falling
        return 2;
    }
    

    0_1547002473983_mangoChart.png

    posted in How-To read more
  • P
    Pikey4

    Hi,

    Trying to monitor cyclic fatigue on a small project, and can manually do it in excel but it's messy and ideally would like it data logged.

    I though the easiest way would be a meta point such as:

    if (p445.lastValue(101) > (p445.lastValue(102), (p445.lastValue(100))));
    
    // means the value has hit peak ??
    {
    	return 1;
    }
    
    if (p445.lastValue(101) > (p445.lastValue(102), and < (p445.lastValue(100))));
    
    // means the value is still climbing ??
    {
        return 2;
    }
    
    if (p445.lastValue(101) < (p445.lastValue(102), (p445.lastValue(100))));
    
    // means the value has hit trough ??
    {
    	return 3;
    }
    
    if (p445.lastValue(101) < (p445.lastValue(102), and > (p445.lastValue(100))));
    
    // means the value is still falling ??
    {
        return 4;
    }
    

    However this only returns a "1" no matter what, so I obviously have done something wrong.

    I was using "lastValue(101)", "lastValue(100)" & "lastValue(102)" only because the point is Persistent TCP (with Live updating) and I didn't want to be looking at the un-updated value. (if that makes sense). So perhaps this is part of the problem??

    Or I have gone completely the wrong way around this and I need to be looking at an alternative solution.

    Any assistance is as always greatly appreciated,

    A picture paints 1000 words:

    0_1546930069795_Untitled.jpg

    Cheers!

    posted in How-To read more
  • P
    Pikey4

    Has Anyone experienced this Error before? First Time I've seen it and Unable to access Mango today

    0_1545003984210_Screen Shot 2018-12-17 at 7.46.00 am.png

    posted in User help read more
  • P
    Pikey4

    Gee Wizz!!!!!

    How did I not think of that??

    Thank Phil,

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • P
    Pikey4

    Thanks Phil,

    I hadn't Considered this as an option so that is great.

    Is there a way to alter the default label - "Select a value for device"

    0_1544571341780_Screen Shot 2018-12-12 at 7.35.33 am.png
    as it doubles up if I have a <label>Plant or Equipment for the selected Project</label>

    @phildunlap said in Filter Device Name after Tag Select:

    I also reworked the query so that it would check the Site tag as well in getting the list of data points. Sometimes the RQL syntax can be complicated!

    Cheers, I am not up to speed with RQL stuff......Back to Khan Academy for me.

    @pikey4 said in Filter Device Name after Tag Select:

    Also is there a way to Build the serial chart so that say the first two points automatically left axis then the next two points auto to the right?? or something like that??

    Did you have any comment on this query?

    Thanks Again!

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • P
    Pikey4

    I tried this one also but doesn't seem to like it.

    Any help appreciated.

    0_1544511058378_Screen Shot 2018-12-11 at 2.50.11 pm.png

    <div layout="column" ng-init="points=[]">
        
        <md-input-container flex="">
            <ma-data-point-tag-select ng-model="maDataPointTagSelect" key="Site" ng-init="maDataPointTagSelect='68 Terrace Rd'"></ma-data-point-tag-select>
                </md-input-container>
                
        <md-input-container>
            <label>Plant or Equipment for the selected Project</label>
            
            <ma-device-name-list ng-model="DeviceName" source-id="maDataPointTagSelect"></ma-device-name-list>
                </md-input-container>
                
        <md-input-container flex="">
            <label>Add a point</label>
            <ma-point-list query="{deviceName: DeviceName}" limit="200" ng-model="point" init-point="false" ng-change="point &amp;&amp; points.push(point); point=null"></ma-point-list>
        </md-input-container>
    </div>
    
    

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • P
    Pikey4

    Thanks Jared, That does the Trick

    posted in How-To read more
  • P
    Pikey4

    Hello Again,

    I'm looking at a way to use Tags to Label specific Project locations then Device name will be the Plant or equipment at that site, then point names etc.

    Not sure if this below is an easy way to build a quick chart, I'm wanting to select the data point tag (Site) first then filter only device names related to that tag. I just can't figure out what the query would be or if I'm headed in the wrong direction.

    Also is there a way to Build the serial chart so that say the first two points automatically left axis then the next two points auto to the right?? or something like that??

    Thanks In advance as always.

    Cheers!

    <div layout="column" ng-init="points=[]">
        
        <md-input-container flex="">
            <ma-data-point-tag-select ng-model="maDataPointTagSelect" key="Site" ng-init="maDataPointTagSelect='68 Terrace Rd'"></ma-data-point-tag-select>
                </md-input-container>
                
        <md-input-container>
            <label>Plant or Equipment for the selected Project</label>
            <ma-device-name-list ng-model="DeviceName" query="???????"></ma-device-name-list>
                </md-input-container>
                
        <md-input-container flex="">
            <label>Add a point</label>
            <ma-point-list limit="200" ng-model="point" init-point="false" ng-change="point &amp;&amp; points.push(point); point=null"></ma-point-list>
        </md-input-container>
    </div>
    
    <md-chips ng-model="points" name="name" readonly="true" md-max-chips="4">
        <md-chip-template ng-click="points.splice($$replacedScope.$index,1)">
            <strong>{{$chip.name}}</strong>
            <em>({{$chip.deviceName}})</em>
            <md-icon>close</md-icon>
        </md-chip-template>
    </md-chips>
    
    <ma-point-values points="points" values="combined" from="dateBar.from" to="dateBar.to" rollup="{{dateBar.rollupType}}" rollup-interval="{{dateBar.rollupIntervals}} {{dateBar.rollupIntervalPeriod}}">
    </ma-point-values>
    
    <ma-serial-chart style="height: 300px; width: 100%" values="combined" points="points" legend="true">
    </ma-serial-chart>
    
    

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • P
    Pikey4

    Hi All

    I have Specific Data Sources all with the xid beginning with the same 5 characters.

    How best to use watchlist parameter to filter for only these Data sources?

    I looked at the "xid is like" and "name is like" but i'm not sure I understand this correctly.

    All help appreciated.

    Thanks

    posted in How-To read more
  • P
    Pikey4

    Thanks for you r response,

    I have done an upgrade from 3.4 to 3.5 this morning and it now works, so we all good.

    posted in Dashboard Designer & Custom AngularJS Pages read more