Facility Control

 View Only
  • 1.  Shared data sources over network

    Posted 07-29-2019 09:55

    I set up an External XML Data Source Panel and used as my Data Source for multiple panels. This updates nicely and keeps me organised when working with a single instance of Dashboard hosting several grid files.

    However when two instances of Dashboard run the same grid files they don't automatically update the parameters in real-time, instead you need to press F5.

    How would I set up multiple dashboard instances that share the same XML data source over network such that they automatically read and update the data source similar to how they do on a single instance?



  • 2.  RE: Shared data sources over network

    Posted 07-29-2019 15:43

    Hi Tim

    If you need to share parameters across multiple instances of DashBoard or across separate computers, you'll likely want to make use of our jsonport attribute. It is a special attribute you can add to a panel to make it into an OGP-JSON server. You can then connect your remote DashBoards to this server and get access to the parameters.

    For your remote DashBoard, you would add a new "TCP/IP DashBoard Connect/openGear Device" and specify the port you entered in your server panel:

     

    You would then configure the data source of your custom panel to be the "New Device" you just added to your tree:

     

    Your remote panel will now be able to see all of the parameters from your server panel. The information will be updated in both directions and will be stored in the data XML on your server machine.

     

    Hope this helps.

     

    James


    #DashBoard


  • 3.  RE: Shared data sources over network

    Posted 07-30-2019 08:03

    Hello James,

    Yes this helps a bit with one problem I was working on, but there is still one major issue I'm dealing with.

    With the example you provided I was able to make two grid files, host and editor, where the host can edit the param value and editor can see that data update. However I would simultaneously like for the opposite to be true.

    In my ideal situation I would have 1 host of all params in a network of dashboards in which several editors can manipulate their respectively designated params simultaneously which the host will see in realtime, while the host can also edit his designated params that all editors then can see.

    I would set up several servers, but I don't think it's possible to mix and match multiple data sources like that? Unless I'm mistaken the jsonport solution doesn't cover this scenario.


    #DashBoard


  • 4.  RE: Shared data sources over network

    Posted 07-30-2019 14:15

    Hi Tim.

    You can have as many data sources as you want inside of a CustomPanel. The technique I demonstrated is if you want to grab ALL of your data from a single source. If you'd like each panel to have (and possibly publish) its own data as well as ingest/modify data from a number of other sources, we have a tag called <context id="short-name-for-you-to-use" objectid="actual-hardware-identifier-for-the-device"/> that will allow you to use <param contextid="short-name-for-you-to-use" oid="OID_FROM_THE_DEVICE"/> to add parameters from other sources anywhere you want.

    The "Device" button in the source editor is your quick way to add one of these <context/> tags:

     


    #DashBoard


  • 5.  RE: Shared data sources over network

    Posted 07-30-2019 14:39

    I'm sorry but I think there's been a misunderstanding. I made a mock-up of the scenario I'm talking about. In this situation "Host.grid" would be on a completely separate machine from "Edit.grid" and they would communicate over network.

     

    The way I've solved this issue previously is by creating an External XML Data Source Panel, then set up a shared folder in windows and use that as the data source.

    However, it does not update when the XML file updates, only when you refresh the file for example by closing and reopening it or by pressing F5. This issue is limiting me in the potential for developing more complex interactions between grid files.

     

    So my question is: Can this be done such that it works exactly as it does when you are working on a single client on a single machine?


    #DashBoard


  • 6.  RE: Shared data sources over network

    Posted 07-30-2019 16:09

    Hi Tim.

    The shortest answer is: no. The XML file used in multiple panels within the same DashBoard instance keeps everything up-to-date since DashBoard internally shares the XML-based device as a single object. When you are running in multiple instances of DashBoard (on the same or on different computers), both DashBoards will attempt to write to the file and the last one to do so wins - there is no attempt to re-sync the XML if it is changed by a different process.

    The solution to this issue is the one that I have presented to you - you can turn as many XML files as you want into OGP-JSON servers where each XML file is owned by one DashBoard process and shared to the others as though it were an OGP device. The "owner" DashBoard will collect all changes made locally or remotely and show them in its CustomPanel and push the updates to all other CustomPanels -  this should get you (fairly closely) back to the workflow you were describing.  Its just that each XML is only owned/maintained by the server - you can edit parameter values on the remote DashBoards and see changes made but only the owner can add/remove parameters from the list. This is usually not a problem once a panel is created since parameters are rarely created at run-time.

    The most recent example I sent was to show how you can have a combination of shared and local data resources - you can also turn multiple panels into their own servers to break-up your parameters and share them however you wish. It's possible that I have misread your requirements for this part and am happy to discuss further if you'd like.

    Looking at your mock-up, if you'd like some parameters to be read/write and some to be read-only, I'd recommend doing this at the UI level where you can 'force read only' on any parameter's display or change-out the widget to something non-editable like a Label.

    OR

    Cheers.

    James

     

     


    #DashBoard


  • 7.  RE: Shared data sources over network

    Posted 08-06-2019 14:10

    I see now that using the jsonport as the default and only data source behaves differently from setting up multiple devices. That means that the original solution was exactly what I was looking for!

     

    Thanks

    /Tim


    #DashBoard