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

Dashboard ng-click on virtual data source


  • Hi guys,
    I have started setting up a dashboard and am having an issue that I think is related to settable virtual data sources.
    On the page I have an svg graphic with some values displayed and some buttons that set values. Some settable values (using the ng-click function) are writing to modbus registers and some to virtual data points. All of the modbus points are working fine but I cannot get the virtual data point to set. I have them both set up the same way. If I use a ma-set-point-value on the same dashboard to set the virtual data point it work ok. Am I supposed to do something different for a Virtual Data Point with ng-click?
    When I open the dashboard I get the following error:

    WARN 2020-04-09T23:17:21,833 (com.infiniteautomation.mango.rest.v2.ServerRestV2Controller.postClientError:428) - Client error
    [user=admin, cause=<marker inkscape:stockid="Arrow1Lstart" orient="auto" refY="0" refX="0" id="Arrow1Lstart" style="overflow:visible" inkscape:isstock="true">, location=http://localhost:8080/ui/view-page/5b203b4b-fee2-4365-8899-8c65a0f8143e, userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0, language=en-GB, date=2020-04-09T23:17:21.617+01:00, timezone=Europe/London]
    ReferenceError: google is not defined
    at i (http://localhost:8080/ui/mangoUi~ngMango.js?v=8cb0234a2dec15eb57f3:18:435685)
    at le/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:7418)
    at ke (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:56689)
    at ae (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:51498)
    at ce/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:44367)
    at ce/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:44384)
    at ce/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:44384)
    at ie/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:43580)
    at link (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:152726)
    at le/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:7418)
    at ke (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:56689)
    at ae (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:51498)
    at ce/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:44367)
    at ie/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:43580)
    at fe/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:46787)
    at r (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:44729)
    at f (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:49982)
    at compile/</</< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:152197)
    at u/</< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:94777)
    at u/< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:94915)
    at $digest (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:100341)
    at $apply (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:102518)
    at i/c< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:124858)
    at Qr/this.$get</</this.completeTask (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:122819)
    at un/this.$get</</a.defer/r< (http://localhost:8080/ui/mangoUi~ngMango~ngMangoServices.js?v=2fcf97988116666c7bfe:78:34332)

    Heres a sample of the markup im using:
    Modbus Data Source:
    <ma-get-point-value point-xid="ResetMax" point="ResetMax"></ma-get-point-value>
    <div ma-selector="#ResetButtonAll" ng-click="ResetMax.setValue(9)"></div>

    Virtual Data Source:
    <ma-get-point-value point-xid="GloveClass" point="GloveClass"></ma-get-point-value>
    <div ma-selector="#GloveClass0" ng-click="GloveClass.setValue(0)"></div>


  • Might be good to separate your names, you're using XIDs which are strings and point object variables with the same name, let's change that to avoid confusion first then let's examine your console. Secondly use three ` before and after your text to put everything into a coding block. makes reading console logs and code a darned site easier!
    For a start:

    <ma-get-point-value point-xid="ResetMax" point="ResetMaxPt"></ma-get-point-value>
    <div ma-selector="#ResetButtonAll" ng-click="ResetMaxPt.setValue(9)"></div>
    
    Virtual Data Source:
    <ma-get-point-value point-xid="GloveClass" point="GloveClassPt"></ma-get-point-value>
    <div ma-selector="#GloveClass0" ng-click="GloveClassPt.setValue(0)"></div>
    

    Fox


  • Hi @MattFox. Sorry about that. I have changed all the point names as suggested and also changed them in the code. As I mentioned, all of the settable modbus point are working ok. Just can't the virtual points to set. Here is my full markup for the dashboard. As you know by now, I'm not a programmer so its probably something obvious I've done/not none. Thanks for the help.

    <div class="ma-designer-root" style="width: 1366px; height: 768px; position: relative;" id="e363c8cd-3d11-49f9-b1c9-b84c6acd5bcc" ma-center="true" ma-maintain-ratio="to-width">
        <ma-excel-report-run id="f341821a-d305-485c-ab44-858c0de37d9d" style="position: absolute; left: 25px; top: 0px;" xid="XLST_91c2e8db-e4dc-4390-bc2c-1ffe4f3d6ffc"></ma-excel-report-run>
    </div>
        <ma-get-point-value point-xid="GloveCurrent1" point="GloveCurrent1Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveCurrent2" point="GloveCurrent2Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveCurrent3" point="GloveCurrent3Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveCurrent4" point="GloveCurrent4Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveCurrent5" point="GloveCurrent5Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveCurrent6" point="GloveCurrent6Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveCurrent6" point="GloveCurrent6Pt"></ma-get-point-value>
       
        <ma-get-point-value point-xid="GloveMax1" point="GloveMax1Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveMax2" point="GloveMax2Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveMax3" point="GloveMax3Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveMax4" point="GloveMax4Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveMax5" point="GloveMax5Pt"></ma-get-point-value>
        <ma-get-point-value point-xid="GloveMax6" point="GloveMax6Pt"></ma-get-point-value>
        
        <ma-get-point-value point-xid="GloveVoltage" point="GloveVoltagePt"></ma-get-point-value>
        
        <ma-get-point-value point-xid="ResetMax" point="ResetMaxPt"></ma-get-point-value>
        
        <ma-get-point-value point-xid="Glove1Size" point="Glove1SizePt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove2Size" point="Glove2SizePt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove3Size" point="Glove3SizePt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove4Size" point="Glove4SizePt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove5Size" point="Glove5SizePt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove6Size" point="Glove6SizePt"></ma-get-point-value>
        
        <ma-get-point-value point-xid="Glove1Length" point="Glove1LengthPt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove2Length" point="Glove2LengthPt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove3Length" point="Glove3LengthPt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove4Length" point="Glove4LengthPt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove5Length" point="Glove5LengthPt"></ma-get-point-value>
        <ma-get-point-value point-xid="Glove6Length" point="Glove6LengthPt"></ma-get-point-value>
        
        <ma-get-point-value point-xid="GloveClass" point="GloveClassPt"></ma-get-point-value>
        
       <ma-svg ng-include="'/modules/mangoUI/web/img/GGlovesSettings.svg'" style="position: absolute; width: 1920px; height: 940px; left: 0px; top: 35px;">
        
        <div ma-selector="#Current1 tspan" ng-bind="GloveCurrent1Pt.renderedValue"></div>
        <div ma-selector="#Current2 tspan" ng-bind="GloveCurrent2Pt.renderedValue"></div>
        <div ma-selector="#Current3 tspan" ng-bind="GloveCurrent3Pt.renderedValue"></div>
        <div ma-selector="#Current4 tspan" ng-bind="GloveCurrent4Pt.renderedValue"></div>
        <div ma-selector="#Current5 tspan" ng-bind="GloveCurrent5Pt.renderedValue"></div>
        <div ma-selector="#Current6 tspan" ng-bind="GloveCurrent6Pt.renderedValue"></div>
        <div ma-selector="#MaxCurrent1 tspan" ng-bind="GloveMax1Pt.renderedValue"></div>
        <div ma-selector="#MaxCurrent2 tspan" ng-bind="GloveMax2Pt.renderedValue"></div>
        <div ma-selector="#MaxCurrent3 tspan" ng-bind="GloveMax3Pt.renderedValue"></div>
        <div ma-selector="#MaxCurrent4 tspan" ng-bind="GloveMax4Pt.renderedValue"></div>
        <div ma-selector="#MaxCurrent5 tspan" ng-bind="GloveMax5Pt.renderedValue"></div>
        <div ma-selector="#MaxCurrent6 tspan" ng-bind="GloveMax6Pt.renderedValue"></div>
        <div ma-selector="#Voltage tspan" ng-bind="GloveVoltagePt.renderedValue"></div>
       
       <div ma-selector="#ResetButtonAll" ng-click="ResetMaxPt.setValue(9)"></div>
       <div ma-selector="#ResetButton1" ng-click="ResetMaxPt.setValue(0)"></div>
       <div ma-selector="#ResetButton2" ng-click="ResetMaxPt.setValue(1)"></div>
       <div ma-selector="#ResetButton3" ng-click="ResetMaxPt.setValue(2)"></div>
       <div ma-selector="#ResetButton4" ng-click="ResetMaxPt.setValue(3)"></div>
       <div ma-selector="#ResetButton5" ng-click="ResetMaxPt.setValue(4)"></div>
       <div ma-selector="#ResetButton6" ng-click="ResetMaxPt.setValue(5)"></div>
       
       <div ma-selector="#Glove1Size8" ng-click="Glove1SizePt.setValue(0)"></div>
       <div ma-selector="#Glove1Size9" ng-click="Glove1SizePt.setValue(9)"></div>
       <div ma-selector="#Glove1Size10" ng-click="Glove1SizePt.setValue(10)"></div>
       <div ma-selector="#Glove1Size11" ng-click="Glove1SizePt.setValue(11)"></div>
      
       <div ma-selector="#Glove2Size8" ng-click="Glove2SizePt.setValue(8)"></div>
       <div ma-selector="#Glove2Size9" ng-click="Glove2SizePt.setValue(9)"></div>
       <div ma-selector="#Glove2Size10" ng-click="Glove2SizePt.setValue(10)"></div>
       <div ma-selector="#Glove2Size11" ng-click="Glove2SizePt.setValue(11)"></div>
       
        <div ma-selector="#Glove3Size8" ng-click="Glove3SizePt.setValue(8)"></div>
       <div ma-selector="#Glove3Size9" ng-click="Glove3SizePt.setValue(9)"></div>
       <div ma-selector="#Glove3Size10" ng-click="Glove3SizePt.setValue(10)"></div>
       <div ma-selector="#Glove3Size11" ng-click="Glove3SizePt.setValue(11)"></div>
       
        <div ma-selector="#Glove4Size8" ng-click="Glove4SizePt.setValue(8)"></div>
       <div ma-selector="#Glove4Size9" ng-click="Glove4SizePt.setValue(9)"></div>
       <div ma-selector="#Glove4Size10" ng-click="Glove4SizePt.setValue(10)"></div>
       <div ma-selector="#Glove4Size11" ng-click="Glove4SizePt.setValue(11)"></div>
       
        <div ma-selector="#Glove5Size8" ng-click="Glove5SizePt.setValue(8)"></div>
       <div ma-selector="#Glove5Size9" ng-click="Glove5SizePt.setValue(9)"></div>
       <div ma-selector="#Glove5Size10" ng-click="Glove5SizePt.setValue(10)"></div>
       <div ma-selector="#Glove5Size11" ng-click="Glove5SizePt.setValue(11)"></div>
       
        <div ma-selector="#Glove6Size8" ng-click="Glove6SizePt.setValue(8)"></div>
       <div ma-selector="#Glove6Size9" ng-click="Glove6SizePt.setValue(9)"></div>
       <div ma-selector="#Glove6Size10" ng-click="Glove6SizePt.setValue(10)"></div>
       <div ma-selector="#Glove6Size11" ng-click="Glove6SizePt.setValue(11)"></div>
       
       <div ma-selector="#Glove1Length280" ng-click="Glove1LengthPt.setValue(280)"></div>
       <div ma-selector="#Glove1Length360" ng-click="Glove1LengthPt.setValue(360)"></div>
       <div ma-selector="#Glove1Length410" ng-click="Glove1LengthPt.setValue(410)"></div>
       <div ma-selector="#Glove1Length460" ng-click="Glove1LengthPt.setValue(460)"></div>
       
        <div ma-selector="#Glove2Length280" ng-click="Glove2LengthPt.setValue(280)"></div>
       <div ma-selector="#Glove2Length360" ng-click="Glove2LengthPt.setValue(360)"></div>
       <div ma-selector="#Glove2Length410" ng-click="Glove2LengthPt.setValue(410)"></div>
       <div ma-selector="#Glove2Length460" ng-click="Glove2LengthPt.setValue(460)"></div>
       
        <div ma-selector="#Glove3Length280" ng-click="Glove3LengthPt.setValue(280)"></div>
       <div ma-selector="#Glove3Length360" ng-click="Glove3LengthPt.setValue(360)"></div>
       <div ma-selector="#Glove3Length410" ng-click="Glove3LengthPt.setValue(410)"></div>
       <div ma-selector="#Glove3Length460" ng-click="Glove3LengthPt.setValue(460)"></div>
      
       <div ma-selector="#Glove4Length280" ng-click="Glove4LengthPt.setValue(280)"></div>
       <div ma-selector="#Glove4Length360" ng-click="Glove4LengthPt.setValue(360)"></div>
       <div ma-selector="#Glove4Length410" ng-click="Glove4LengthPt.setValue(410)"></div>
       <div ma-selector="#Glove4Length460" ng-click="Glove4LengthPt.setValue(460)"></div>
       
        <div ma-selector="#Glove5Length280" ng-click="Glove5LengthPt.setValue(280)"></div>
       <div ma-selector="#Glove5Length360" ng-click="Glove5LengthPt.setValue(360)"></div>
       <div ma-selector="#Glove5Length410" ng-click="Glove5LengthPt.setValue(410)"></div>
       <div ma-selector="#Glove5Length460" ng-click="Glove5LengthPt.setValue(460)"></div>
      
      
       <div ma-selector="#Glove6Length280" ng-click="Glove6LengthPt.setValue(280)"></div>
       <div ma-selector="#Glove6Length360" ng-click="Glove6LengthPt.setValue(360)"></div>
       <div ma-selector="#Glove6Length410" ng-click="Glove6LengthPt.setValue(410)"></div>
       <div ma-selector="#Glove6Length460" ng-click="Glove6LengthPt.setValue(460)"></div>
       
       <div ma-selector="#GloveClass00" ng-click="GloveClassPt.setValue(00)"></div>
       <div ma-selector="#GloveClass0" ng-click="GloveClassPt.setValue(0)"></div>
       <div ma-selector="#GloveClass1" ng-click="GloveClassPt.setValue(1)"></div>
       <div ma-selector="#GloveClass2" ng-click="GloveClassPt.setValue(2)"></div>
       <div ma-selector="#GloveClass3" ng-click="GloveClassPt.setValue(3)"></div>
       <div ma-selector="#GloveClass4" ng-click="GloveClassPt.setValue(4)"></div>
      
       </ma-svg>
        
    
    

  • Hi Rob

    Just because I know that the point is an alphanumeric from our conversation, you need to set the point as a string. .setpoint('0')


  • @CraigWeb & @MattFox You guys are amazing! Thanks you so much.