Save
Saving
  • A Andras

    Thanks, I will take a look at these options.

    posted in How-To read more
  • A Andras

    In my use case, my devices have about 5 or 7 associated datapoints and also entries in point hierarchy/watchlist are needed in order to be select device related/grouped points from a watchlist.

    I have configured a couple of devices manually, but I am going to need to add up to 100 or somewhere in that magnitude. It will be way too cumbersome to do that manually.

    I tried to find a topic on the forum on how to do this. The closest I found was a link to this topic:

    https://forum.infiniteautomation.com/topic/3708/a-script-jsonemport-example

    I suppose I should be able to figure it out eventually this way. At the same time, I was thinking that this is a quite basic textbook sort of configuration structure I have, and I can't be the first. So I was hoping maybe a bulk device/datapoints config script already exists that I can modify for my purposes?

    posted in How-To read more
  • A Andras

    OK, I found the solution:

    ng-click="designer.parameters.dn={id:2,name:'Device-40'}"
    

    It just occured to me that the watchlist did initially change (clear), so the change detection can't be the problem. It looks like both id and name need to be set this way simultaneously, and then it works.

    Thanks for your help. Next time I will use tags too ;)

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A Andras

    The dn object looks like this:

    "dn": {
        "name": "Device-45,
        "id": 1,
        "pointCount": 5,
        "subfolders": []
    }
    

    In the dashboard designer, I use:

    <ma-watch-list-get ng-model="designer.watchList" parameters="designer.parameters" on-points-change="designer.points = $points" id="d8b6dbb5-2b9c-4588-86ac-8a146e2891d9" watch-list-xid="WL_fecfa985-8e78-44c7-8a73-a2a97b0ef3b6"></ma-watch-list-get>
    
    <ma-watch-list-parameters id="fc2d053c-1d74-4548-b8f2-a7a253adfb44" style="position: absolute; width: 792px; left: 554px; top: 0px; height: 56px;" ng-model="designer.parameters" watch-list="designer.watchList" ng-change="updateParams = designer.parameters"></ma-watch-list-parameters>  
    
    <ma-indicator id="dev40" style="position: absolute; width: 16px; height: 16px; left: 747px; top: 627px;" default-color="#00f500" point-xid="DP_8c32d66c-627b-42cd-b5cb-917d4684b9e5" ng-click="designer.parameters.dn.id=2; designer.parameters.dn.name='Device-40'"></ma-indicator>
    

    The on-points-change attribute is present (it looks like it is an attribute of ma-watch-list-get). The click will change the dn object such that it has the same data as when device 40 was selected from the dropdown. But the change goes unnoticed.

    It looks like some change detection is still needed. My thought was that ng-change="updateParams=designer.parameters" in the parameters dropdown causes a change in the dropdown to propagate, and that something similar is needed for the click. But everything will work even without this attribute being present.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A Andras

    Hi CraigWeb,

    Thank you for your answer, I much appreciate it. I did indeed follow the 'Dynamic Dashboard Workflow' video tutorial, so the point hierarchy is used to select the device points for the watchlist. The names of the devices are 'Device-xx', with xx the device number. I now tried:

    ng-click="designer.parameters.dn = 'Device-40'"
    

    The watchlist parameter selector does clear on the click event, however Device-40 is not selected. It looks like the dn parameter is no longer valid after the click.

    Isn't dn itself an object? I tried for instance to change the code to assign the 'Device-40' string to the name property of dn:

    ng-click="designer.parameters.dn.name = 'Device-40'"
    

    In which case the name 'Device-40' does appear in the device selector dropdown, however this doesn't change the selected watchlist itself.

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A Andras

    Hello all,

    After 8 years, I'm back using Mango for a commercial (light for now) project. I like the new dashboard and other new features, good job! A lot has changed in all those years. It's funny to see that my forum profile is older than that of the IAS staff members :)

    So I created a nice dashboard with a dynamic watchlist for this project, and everything is working pretty much as I intended. There is only one thing that I would like to add, but couldn't figure out yet how to do.

    On top of the possibility for users to change the dynamic watchlist by selecting a device from the watch list parameter dropdown, I would like users to also be able to change the selected watchlist device by clicking on the device ma-indicator that represents the device status. How can I achieve this? Thanks in advance!

    posted in Dashboard Designer & Custom AngularJS Pages read more
  • A Andras

    Hi JointTech,

    The sample code initializes the mobus holding register 0 to 123. For your first test, you don't have to do anything else; you can leave the your-code-goes-here part empty .

    Next, hook up the Arduino serial port to the machine running Mango and create a Modubus data source.

    Then create a data point for holding register 0 and have Mango poll it regularly. If all goes well, you should get the 123 value in your data point.

    When this works, you can proceed to put whatever value you would like in the holding register from the your-code-goes-here section. Just assign the value to regs[MB_REG0]. The start_mb_slave() function in the loop runner will take care of responding to modbus master commands.

    posted in Hardware read more
  • A Andras

    Hi mgvanosd,

    1. Your Arduino needs to be a modbus slave. You don't need a separate device.

    You can use jpmzometa's mobus rtu slave library in your Arduino. I added some code to make it work with Mango. In the meantime this has been included in the library. You can download it from:

    http://sites.google.com/site/jpmzometa/arduino-mbrt/arduino-modbus-slave

    1. Some sample code can be found here:

    http://www.tucsni.nl/jee/

    posted in User help read more
  • A Andras

    Yes, that did the trick. I no longer get the error messages :) Thanks !

    posted in Modbus4J general discussion read more
  • A Andras

    Hi jjconti,

    Yes, Mango is prepared for localization. In you look in the folder WEB-INF/classes you can find the i18n files. If you open messages_en.properties, you will see key=value text lines. You can translate the value part to Spanish and put the translated text in a new file messages_es.properties. Also add a line "es=Espanol" to the file i18n.properties.

    posted in Wishlist read more