• Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    1. Home
    2. sean

    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
    • Profile
    • Following 0
    • Followers 0
    • Topics 20
    • Posts 46
    • Best 0
    • Controversial 0
    • Groups 0

    sean

    @sean

    0
    Reputation
    665
    Profile views
    46
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    sean Unfollow Follow

    Latest posts made by sean

    • RE: About magetpointvalue array's question

      It work thank you

      posted in Dashboard Designer & Custom AngularJS Pages
      sean
      sean
    • RE: About magetpointvalue array's question
       {{ class_kwh[0] }}
      

      Is show this array[0] information

      {"id":2721,"xid":"EMS_004065_001_H1_kWh","name":"kWh-001.班級冷氣-(1小時率)-用電度數(kWh)","enabled":true,"deviceName":"(1小時率)-統計","readPermission":"superadmin,admin,user","setPermission":"superadmin,user","pointFolderId":0,"purgeOverride":false,"unit":"","useIntegralUnit":false,"useRenderedUnit":false,"pointLocator":{"contextUpdate":false,"modelType":"PL.SCRIPTING","settable":true,"dataType":"NUMERIC","varName":"h1_kWh_001","relinquishable":false},"chartColour":"","plotType":"SPLINE","loggingProperties":{"loggingType":"ALL","tolerance":0,"discardExtremeValues":false,"overrideIntervalLoggingSamples":false,"cacheSize":1},"textRenderer":{"useUnitAsSuffix":true,"format":"0.00","suffix":"","type":"textRendererAnalog"},"chartRenderer":{"timePeriod":{"periods":1,"type":"DAYS"},"type":"chartRendererImage"},"rollup":"NONE","simplifyType":"NONE","simplifyTolerance":"NaN","simplifyTarget":5000,"preventSetExtremeValues":false,"templateXid":null,"dataSourceId":88,"dataSourceXid":"EMS_004065_H1_Stats","dataSourceName":"@EMS統計-2.[1小時率]","dataSourceTypeName":"SCRIPTING","dataSourceEditRoles":[],"tags":{},"originalId":"EMS_004065_001_H1_kWh","lastPayload":{"xid":"EMS_004065_001_H1_kWh","event":"REGISTERED","value":{"dataType":"NUMERIC","value":0,"timestamp":1625454000000,"annotation":null},"renderedValue":"0.00 ","convertedValue":0,"enabled":true,"pointEnabled":true,"attributes":{}},"running":true,"_textRenderer":{},"value":0,"time":1625454000000,"convertedValue":0,"renderedValue":"0.00 ","unreliable":false}
      
      posted in Dashboard Designer & Custom AngularJS Pages
      sean
      sean
    • RE: About magetpointvalue array's question

      But in

      <ma-point-query query="{name:'channel-kwh'}" points="class_kwh" promise="promise"></ma-point-query>
      <ma-get-point-value points="class_kwh"></ma-get-point-value>
      

      I can use {{ class_kwh[0] }} to show this index array obj detail but I don't how to show value or rendered value
      {{ class_kwh[0].value }} or {{ class_kwh[0].renderedValue }}
      both not work

      posted in Dashboard Designer & Custom AngularJS Pages
      sean
      sean
    • About magetpointvalue array's question
      <div class="" ng-init="values = [];select = []">
          <label ng-repeat="classID in classArray track by $index" class="col-2 px-4">
              <input class="check-btn" type="checkbox" ng-model="ems.EMSObjectID.ctrler[$index]" value="classID"
                  ng-true-value="{{ classID }}"  ng-click="values.push(class_kwh[$index].renderedValue)">
              <span>
                  {{classID}}
              </span>
          </label>
      </div>
      
      <div ng-repeat="vla in class_kwh">
          {{ vla[ 'renderedValue' + point.xid ] }}
      </div>
      
      <ma-point-query query="{name:'channel-kwh'}" points="class_kwh" promise="promise"></ma-point-query>
      <ma-get-point-value points="class_kwh"></ma-get-point-value>
      
      

      I got class_kwh array with ma-get-point-vlaue and I can use repeat to show value by <div ng-repeat="vla in class_kwh"> {{ vla[ 'renderedValue' + point.xid ] }} </div> how do I use

      <input class="check-btn" type="checkbox" ng-model="ems.EMSObjectID.ctrler[$index]" value="classID"
                  ng-true-value="{{ classID }}" ng-click="values.push(class_kwh[$index].renderedValue)">
      

      this $index to get class_kwh[$index] and to show [ 'renderedValue' + point.xid ]
      I want to use checkbox get index and push this $idex's class_kwh array value to values

      posted in Dashboard Designer & Custom AngularJS Pages
      sean
      sean
    • RE: Data Point Value

      @mattfox I just want save object in value or value can't be object?
      Code is this

              <div ng-init="rackList = [ 
              {'Name': 'CardName_A01', 'Rack': 'CardNo_A01', 'Label': 'A', 'idx': 1}, {'Name': 'CardName_A02', 'Rack': 'CardNo_A02', 'Label': 'A', 'idx': 2}, {'Name': 'CardName_A03', 'Rack':'CardNo_A03', 'Label': 'A', 'idx': 3},
              {'Name': 'CardName_A04', 'Rack': 'CardNo_A04', 'Label': 'A', 'idx': 4}, {'Name': 'CardName_A05', 'Rack': 'CardNo_A05', 'Label': 'A', 'idx': 5}, 
              {'Name': 'CardName_A06', 'Rack': 'CardNo_A06', 'Label': 'A', 'idx': 6}, {'Name': 'CardName_A07', 'Rack': 'CardNo_A07', 'Label': 'A', 'idx': 7}, {'Name': 'CardName_A08', 'Rack':'CardNo_A08', 'Label': 'A', 'idx': 8}, 
              {'Name': 'CardName_A09', 'Rack': 'CardNo_A09', 'Label': 'A', 'idx': 9}, {'Name': 'CardName_A10', 'Rack': 'CardNo_A10', 'Label': 'A', 'idx': 10},
              {'Name': 'CardName_B01', 'Rack': 'CardNo_B01', 'Label': 'B', 'idx': 1}, {'Name': 'CardName_B02', 'Rack': 'CardNo_B02', 'Label': 'B', 'idx': 2}, {'Name': 'CardName_B03', 'Rack':'CardNo_B03', 'Label': 'B', 'idx': 3}, 
              {'Name': 'CardName_B04', 'Rack': 'CardNo_B04', 'Label': 'B', 'idx': 4}, {'Name': 'CardName_B05', 'Rack': 'CardNo_B05', 'Label': 'B', 'idx': 5}, 
              {'Name': 'CardName_B06', 'Rack': 'CardNo_B06', 'Label': 'B', 'idx': 6}, {'Name': 'CardName_B07', 'Rack': 'CardNo_B07', 'Label': 'B', 'idx': 7}, {'Name': 'CardName_B08', 'Rack':'CardNo_B08', 'Label': 'B', 'idx': 8}, 
              {'Name': 'CardName_B09', 'Rack': 'CardNo_B09', 'Label': 'B', 'idx': 9}, {'Name': 'CardName_B10', 'Rack': 'CardNo_B10', 'Label': 'B', 'idx': 10},
              {'Name': 'CardName_C01', 'Rack': 'CardNo_C01', 'Label': 'C', 'idx': 1}, {'Name': 'CardName_C02', 'Rack': 'CardNo_C02', 'Label': 'C', 'idx': 2}, {'Name': 'CardName_C03', 'Rack':'CardNo_C03', 'Label': 'C', 'idx': 3}, 
              {'Name': 'CardName_C04', 'Rack': 'CardNo_C04', 'Label': 'C', 'idx': 4}, {'Name': 'CardName_C05', 'Rack': 'CardNo_C05', 'Label': 'C', 'idx': 5}, 
              {'Name': 'CardName_C06', 'Rack': 'CardNo_C06', 'Label': 'C', 'idx': 6}, {'Name': 'CardName_C07', 'Rack': 'CardNo_C07', 'Label': 'C', 'idx': 7}, {'Name': 'CardName_C08', 'Rack':'CardNo_C08', 'Label': 'C', 'idx': 8}, 
              {'Name': 'CardName_C09', 'Rack': 'CardNo_C09', 'Label': 'C', 'idx': 9}, {'Name': 'CardName_C10', 'Rack': 'CardNo_C10', 'Label': 'C', 'idx': 10},
              {'Name': 'CardName_D01', 'Rack': 'CardNo_D01', 'Label': 'D', 'idx': 1}, {'Name': 'CardName_D02', 'Rack': 'CardNo_D02', 'Label': 'D', 'idx': 2}, {'Name': 'CardName_D03', 'Rack':'CardNo_D03', 'Label': 'D', 'idx': 3}, 
              {'Name': 'CardName_D04', 'Rack': 'CardNo_D04', 'Label': 'D', 'idx': 4}, {'Name': 'CardName_D05', 'Rack': 'CardNo_D05', 'Label': 'D', 'idx': 5}, 
              {'Name': 'CardName_D06', 'Rack': 'CardNo_D06', 'Label': 'D', 'idx': 6}, {'Name': 'CardName_D07', 'Rack': 'CardNo_D07', 'Label': 'D', 'idx': 7}, {'Name': 'CardName_D08', 'Rack':'CardNo_D08', 'Label': 'D', 'idx': 8}, 
              {'Name': 'CardName_D09', 'Rack': 'CardNo_D09', 'Label': 'D', 'idx': 9}, {'Name': 'CardName_D10', 'Rack': 'CardNo_D10', 'Label': 'D', 'idx': 10},
              {'Name': 'CardName_E01', 'Rack': 'CardNo_E01', 'Label': 'E', 'idx': 1}, {'Name': 'CardName_E02', 'Rack': 'CardNo_E02', 'Label': 'E', 'idx': 2}, {'Name': 'CardName_E03', 'Rack':'CardNo_E03', 'Label': 'E', 'idx': 3}, 
              {'Name': 'CardName_E04', 'Rack': 'CardNo_E04', 'Label': 'E', 'idx': 4}
              ]"></div>
              <ma-get-point-value point-xid="XID_cardControllerLastRack" point="LastRackSelect"></ma-get-point-value>
              <div ng-init="pointName.Rack = LastRackSelect.value"></div>
              <ma-point-query query="{$and: true,name:pointName.Rack,deviceName: 'RackAccessSystem'}" sort="'name'" points="points"></ma-point-query>
              <ma-point-query query="{$and: true,name:pointName.Name,deviceName: 'RackAccessSystem'}" sort="'name'" points="names"></ma-point-query>
              <ma-get-point-value points="points"></ma-get-point-value>
              <ma-get-point-value points="names"></ma-get-point-value>
      <form layout-gt-sm="row" name="Form">
                      <md-input-container flex="" id="cardedit">
                          <label>select Item</label>
                          <md-select class="select-block" ng-model="pointName" ng-change="LastRackSelect.setValue(pointName)" ng-model-options="{getterSetter:true}">
                              <md-option ng-repeat="Rack in rackList" ng-value="Rack">{{Rack.Name | limitTo:3:9}}</md-option>
                          </md-select>
                      </md-input-container>
                  </form>
      

      I want to save select pointName object to save in datapoint XID_cardControllerLastRack
      when nexttime into this page can load XID_cardControllerLastRack value to use default select ng-model

      posted in User help
      sean
      sean
    • Data Point Value

      A question about Point Value type,
      How to save object type like newValue = {"Name":"CardName_A02","Rack":"CardNo_A02","Label":"A","idx":2}
      into datapoint ?
      I use
      Point.setValue(newValue)
      but in Point's value is null
      How do I do to save object type value in datapoint?

      posted in User help
      sean
      sean
    • RE: Point variable use index

      thank you
      use $sce can show inside component

      <ma-get-point-value point-xid="DP_001_Meter_kWh" point="c001_Meter_kWh"></ma-get-point-value>
      

      but can't use bind {{c001_Meter_kWh.value}} in other side to see value
      how to fix it?

      posted in User help
      sean
      sean
    • RE: Point variable use index

      I got new idea

      use component

        app.component("pointCom", {
          bindings: {
                point: "<",
                qty: "@",
                min: "@",
                max: "@"
              },
              controller: dataController,
              controllerAs: "dc",
              template:`
              <span>Render</span>
              <div ng-bind-html="dc.sour">
              </div>
              `
            });
            
            dataController.$inject = ["$scope"]
            
            function dataController($scope){
                let dc = this
                let P = dc.point
                let Q = dc.qty
                let min = dc.min
                let max = dc.max
                let num = 0
                
                this.$onChanges = function() {
                    let p = dc.point
                    dc.sour = ''
                    max = dc.max
                    num = dc.min
                    console.log(school)
                    if (max !== undefined){
                        Q = max
                    } else {
                        Q = dc.qty
                    }
                    if (p !== undefined){
                        for (let i=0; i < Q; i++){
                        num = Number(num)
                        num = num.pad(3)
                        dc.sour += `
      
                        <ma-get-point-value point-xid="DP_${num}_Meter_kWh" point="c${num}_Meter_kWh"></ma-get-point-value>
                        <ma-get-point-value point-xid="DP_${num}_Meter_V" point="c${num}_Meter_V"></ma-get-point-value>
                        <ma-get-point-value point-xid="DP_${num}_Meter_A" point="c${num}_Meter_A"></ma-get-point-value>
      
                        `
                        num++
                      }
                      console.log(dc.sour)
                      angular.element(dc.sour)
                    }
                  }
                  
                  Number.prototype.pad = function(size) {
                  	let s = String(this)
                  	while (s.length < (size || 2)) {s = "0" + s;}
                  	return s
                  }
                  
              }
      

      but in the html dom
      <ma-get-point-value> just dispear like this pic
      pc_er.PNG
      how do I fix it?

      in console.log can see dc.sour

      <ma-get-point-value point-xid="DP_001_Meter_kWh" point="c001_Meter_kWh"></ma-get-point-value>
                        <ma-get-point-value point-xid="DP_001_Meter_V" point="c001_Meter_V"></ma-get-point-value>
                        <ma-get-point-value point-xid="DP_001_Meter_A" point="c001_Meter_A"></ma-get-point-value>
      
      posted in User help
      sean
      sean
    • RE: Point variable use index

      Thank you ! for It working

      posted in User help
      sean
      sean
    • Point variable use index

      when I have maybe 10 datapoint's xid like "DP_c01_temperature" "DP_c02_temperature" ... "DP_c10_temperature"

      I want use ng-repeat to get 1 to 10 index code like this

      <div ng-repeat="x in [].constructor(10) track by index">
        <ma-get-point-value point-xid="DP_c{{index}}_temperature" point="c{{index}}_temperature"></ma-get-point-value>
        <div class="value">C{{index}} Temperature: <span ng-bind="c{{index}}_temperature.value"></span></div>
      </div>
      

      but point in console Error: [$parse:syntax] Syntax Error: Token '{' is an unexpected token at column 4 of the expression [c{{index}}_temperature] starting at [{{index}}_temperature].

      How can I fix it ?

      posted in User help
      sean
      sean