• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. oja

    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 Mango 5 Documentation Website
    O
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 28
    • Best 0
    • Controversial 0
    • Groups 0

    oja

    @oja

    0
    Reputation
    1.4k
    Profile views
    28
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    oja Unfollow Follow

    Latest posts made by oja

    • RE: Server-Side Script to output a table with latest n values of a datapoint

      Yes, I can use data for graph or table of values. I have method in Server - javascript (View) for last X values or values between time interval.
      Similar method I have in javascript (dataPoint). Now I can get last of values and calculate weightedd average, moving average for example.

      Ondrej

      posted in How-To
      O
      oja
    • RE: Server-Side Script to output a table with latest n values of a datapoint

      You can see some demo on http://kraken.alarex.net:8080/scada_orlik/public_view.htm?viewId=14

      This is combination serverscript, javascript and Flash.

      Code, which is used in View. "dataPoint.getLatestPointValues(10)" is own added method to ScadaBR.

      
      var data_series =  dataPoint.getLatestPointValues(10);
      var pole = "[";
      for (i=0;i<data_series.size();i++) {
           pole+=""+data_series.get(i).getDoubleValue();
           if (i!=data_series.size()-1) pole+=",";
      }
      pole+="]";
      
      s = "<script>try {document.getElementById(\"AXLED\")._ax_setChartValues("+pole+");} catch (e){};</script>";
      return s;
      
      

      On http://kraken.alarex.net:8080/scada_orlik/public_view.htm?viewId=15
      is some test of JavaScript chart.

      ServerScript is non-standard, but can be strong in Mango, when some change be provided. I like it and I think, that this is best on Mango.

      Ondrej

      posted in How-To
      O
      oja
    • RE: Server-Side Script to output a table with latest n values of a datapoint

      Hello,

      I solved this. But, I modified ScadaBR 0.9 (fork Mango). When you able to modify source code of Mango, I can send my code. It is a few classes.

      Ondrej

      posted in How-To
      O
      oja
    • RE: How to write server-side scripts

      Hi,

      Scripts in MetaPoints:

      1. Context's points - you can add some points to your MetaPoint for access from script.
      2. Final value - result, have to save with commnad return value.
      3. You cannot save value to other points from script
      4. You cannot get others values from points, only last value. You cannot take previous value from Metapoint in your script without simple hack.

      Hack for previous value from MetaPoint

      1. create your metapoint with some simply script
      2. save your metapoint and activate it and activate datasource - green light
      3. go to another screen on Mango - views, lists and return back to MetaDataSource and metapoint. Now you can add this metapoint as source point for your script.
      4. disable alarm level - Context point disabled = NONE

      I am working in ScadaBR, clone of Mango. Yesterday I modified MetaDataPoints and I added new functions for scripts - last(limit) ... gets last point values and list(from, to) ... gets list of values between ....
      It works good.

      Attachment: download link

      posted in How-To
      O
      oja
    • RE: How to write server-side scripts

      What do you need?

      In MetaPoint window is icons with (?) and there is some basic info about writing script. I wrote some scripts in Mango, I can help you.

      Oja

      posted in How-To
      O
      oja
    • RE: How to work with Mango

      Hi,

      there is manual for ScadaBR - clone of Mango http://sourceforge.net/projects/scadabr/files/Software/Docs/Manual ScadaBR.pdf/download

      Or, you have to try...try...try, but Mango is very friendly, I like it.

      Oja

      posted in How-To
      O
      oja
    • RE: Monitoring bursts

      @bartdeboeck said:

      Thanks for replying.

      I probably have to add time information to the uploaded data as the time of measurement is unrelated to the time of submission to mango?

      thanks
      Bart

      Do you need real timestamp from device than delivery timestamp? It is this example.

      HTTP request from device with id unit1 :```
      http://some.mango.xx/httpds?__time=yyyyMMddHHmmss&unit1_reset=0&unit1_version=2.0

      
      I use HTTP protocol in Mango for monitoring drilling machine with GPRS unit. You can see it on: http://kraken.alarex.net:8080/mango_alarex/public_view.htm?viewId=3
      
      Oja
      
      posted in User help
      O
      oja
    • RE: Edit Raw Data

      I think, it is only one way to change or delete old values.
      I did it one or two times without problems.

      You can this:

      1. Backup DERBY files or go to Export function in Mango
      2. Create new Mango on other PC
      3. Import data from backup
      4. Try SQL operations

      I think, that you will be succesfully.

      sorry for my English.

      posted in How-To
      O
      oja
    • RE: Edit Raw Data

      I think that you can do it by SQL queries. Third icon from end on icon bar.
      You have to see table DataPoints - check ID column and XID column. Right value ID can be used for query on table PointValues.

      posted in How-To
      O
      oja
    • RE: No rxtxSerial Problem

      This is right page:

      http://rxtx.qbang.org/wiki/index.php/Main_Page

      posted in Mango Automation general Discussion
      O
      oja