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

Averaging from Modbus source to MySQL database


  • I have a device that I am collecting measurements from via Mango. It is configured as a serial Modbus source, and I can poll the device with any frequency needed.

    What is the simplest/most efficient method to make use of Mango's "logging properties" (i.e. averaging over an interval) and move these averages into a MySQL database source?

    I would really appreciate any thoughts, pointers, or warnings you may have. Thanks!


  • Quicly looking.... All the features needed for this are in mango. You could use Modbus datasource to read values, meta data points (source) to do the calculation and then SQL datasource to feed the results to MySql. Event handler might be needed to trigger the setting of the SQL data point.

    There is one small detail missing from the online help. The SQL update statement should be something like "UPDATE sometable.Test SET B=? WHERE A='1' ;" When the point value is set mango replaces the question mark with the point value in the update statement.

    BR
    Jokke


  • Another idea is to just use MySQL as Mango's database (either brand new or converting from an existing Derby instance). Then, other applications can directly access the pointValues/pointValueAnnotations tables.