• T
    turboblade

    I am currently using Mango as a SCADA interface with a number of Wind Turbines. I would like to be able to produce a Power Curve for each Wind Turbine. This is basically a graph showing discrete "Wind Speeds" along the x-axis, with corresponding average "Power Output" along the y-axis.

    "Wind Speed" and "Power Output" are two values that are polled from each Wind Turbine every 10 seconds and logged in the database.

    As I see it this is a four step process:

    1. Search the database for each occurrence of each discrete "Wind Speed" and record the corresponding date/time stamp
    2. Use these date/time stamps to lookup all of the "Power Outputs" that occurred against each "Wind Speed"
    3. Take an average of the "Power Outputs" against each "Wind Speed"
    4. Plot the "Power Output" averages against each of the discrete "Wind Speeds" on a graph

    eg as shown below

    image

    This can be done manually using csv exports and lookup tables in excel. But does anyone have any ideas how this process could be automated by Mango.

    Thanks

    posted in User help read more
  • T
    turboblade

    Trying to convert my Derby to MSSQL 2008, but I am presented with the following error. Any suggestions?

    INFO  2013-11-19 23:06:22,950 (com.serotonin.util.properties.ReloadingProperties.checkForReload:142) - (env) Found updated file(s) at [C:\Documents and Settings\Administrator.WINDXPGST1\Desktop\Mango\classes\env.properties, C:\Documents and Settings\Administrator.WINDXPGST1\Desktop\Mango\overrides\properties\env.properties]. Reloading properties 
    WARN  2013-11-19 23:06:24,887 (com.serotonin.m2m2.Main.getProperties:607) - Module C:\Documents and Settings\Administrator.WINDXPGST1\Desktop\Mango\web\modules\_save: module.properties not found in module directory. Module not loaded. 
    INFO  2013-11-19 23:06:24,887 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'dglux', v1.0.3 by Infinite Automation Systems Inc. 
    INFO  2013-11-19 23:06:24,903 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'dojo', v1.7.3 by Serotonin Software 
    INFO  2013-11-19 23:06:24,903 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'graphicalViews', v1.4.1 by Serotonin Software 
    INFO  2013-11-19 23:06:25,106 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'internal', v1.4.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,121 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'maintenanceEvents', v1.4.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,137 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'modbus', v1.4.2 by Serotonin Software 
    INFO  2013-11-19 23:06:25,168 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'pointLinks', v1.4.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,168 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'reports', v2.0.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,184 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'scheduledEvents', v1.4.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,200 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'scripting', v1.0.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,215 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'sqlds', v1.4.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,231 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'sstGraphics', v1.0.1 by Serotonin Software 
    INFO  2013-11-19 23:06:25,231 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'virtualDS', v1.4.0 by Serotonin Software 
    INFO  2013-11-19 23:06:25,246 (com.serotonin.m2m2.Main.loadModules:371) - Loading module 'watchlists', v1.4.0 by Serotonin Software 
    INFO  2013-11-19 23:06:26,496 (com.serotonin.m2m2.db.BasePooledProxy.initializeImpl:36) - Initializing pooled connection manager 
    WARN  2013-11-19 23:06:28,183 (com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade:96) - Upgrading 'core' from 1 to 2 
    INFO  2013-11-19 23:06:28,183 (com.serotonin.m2m2.db.upgrade.DBUpgrade.createUpdateLogOutputStream:152) - Writing upgrade log to C:\Documents and Settings\Administrator.WINDXPGST1\Desktop\Mango\logs\com.serotonin.m2m2.db.upgrade.Upgrade1.log 
    ERROR 2013-11-19 23:06:28,980 (com.serotonin.m2m2.Main.main:93) - Error during initialization 
    com.serotonin.ShouldNeverHappenException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [alter table publishers add column rtdata image; ]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'column'.
    	at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:102)
    	at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:34)
    	at com.serotonin.m2m2.db.DatabaseProxy.initialize(DatabaseProxy.java:144)
    	at com.serotonin.m2m2.Lifecycle.databaseInitialize(Lifecycle.java:445)
    	at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:159)
    	at com.serotonin.m2m2.Main.main(Main.java:87)
    Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [alter table publishers add column rtdata image; ]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'column'.
    	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:233)
    	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:406)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:427)
    	at com.serotonin.m2m2.db.BasePooledProxy.runScript(BasePooledProxy.java:71)
    	at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:129)
    	at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:143)
    	at com.serotonin.m2m2.db.upgrade.DBUpgrade.runScript(DBUpgrade.java:134)
    	at com.serotonin.m2m2.db.upgrade.Upgrade1.upgrade(Upgrade1.java:17)
    	at com.serotonin.m2m2.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:98)
    	... 5 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'column'.
    	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:775)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:676)
    	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
    	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
    	at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:649)
    	at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:266)
    	at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:420)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395)
    	... 12 more
    INFO  2013-11-19 23:06:29,026 (com.serotonin.m2m2.db.BasePooledProxy.terminate:108) - Stopping database 
    
    

    posted in Mango Automation Installation read more
  • T
    turboblade

    I am currently using Mango as a SCADA interface with a number of Wind Turbines. I would like to be able to produce a Power Curve for each Wind Turbine. This is basically a graph showing discrete "Wind Speeds" along the x-axis, with corresponding average "Power Output" along the y-axis.

    "Wind Speed" and "Power Output" are two values that are polled from each Wind Turbine every 10 seconds and logged in the database.

    As I see it this is a four step process:

    1. Search the database for each occurrence of each discrete "Wind Speed" and record the corresponding date/time stamp
    2. Use these date/time stamps to lookup all of the "Power Outputs" that occurred against each "Wind Speed"
    3. Take an average of the "Power Outputs" against each "Wind Speed"
    4. Plot the "Power Output" averages against each of the discrete "Wind Speeds" on a graph

    eg as shown below

    image

    This can be done manually using csv exports and lookup tables in excel. But does anyone have any ideas how this process could be automated by Mango.

    Thanks

    posted in User help read more
  • T
    turboblade

    ok I will use it for now. Can you please explain how to copy my existing DGLux dashboard to a new Mango installation

    posted in Mango Automation Installation read more
  • T
    turboblade

    Ok here I am now using a clean database and I am presented with the following error when I open the data sources page:

    Server error: PreparedStatementCallback; bad SQL grammar [SELECT dp.id,dp.data,dp.xid,dp.dataSourceId,dp.name,dp.deviceName,dp.enabled,dp.pointFolderId,dp.loggingType,dp.intervalLoggingPeriodType,dp.intervalLoggingPeriod,dp.intervalLoggingType,dp.tolerance,dp.purgeOverride,dp.purgeType,dp.purgePeriod,dp.defaultCacheSize,dp.discardExtremeValues,dp.engineeringUnits,ds.name,ds.xid,ds.dataSourceType FROM dataPoints AS dp join dataSources ds on ds.id = dp.dataSourceId ORDER BY dp.deviceName, dp.name OFFSET ? ROWS FETCH NEXT ? ROWS ONLY]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'OFFSET'.
    Server error: PreparedStatementCallback; bad SQL grammar [SELECT id,xid,name,dataSourceType,data FROM dataSources ORDER BY name OFFSET ? ROWS FETCH NEXT ? ROWS ONLY]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'OFFSET'.
    

    Also, when I open the beta alarms page I am presented with the following error:

    Server error: PreparedStatementCallback; bad SQL grammar [SELECT evt.id,evt.typeName,evt.subtypeName,evt.typeRef1,evt.typeRef2,evt.activeTs,evt.rtnApplicable,evt.rtnTs,evt.rtnCause,evt.alarmLevel,evt.message,evt.ackTs,evt.ackUserId,evt.alternateAckSource,u.username,(select count(1) from userComments where commentType=1 and typeKey=evt.id) as cnt ,ue.silenced FROM events AS evt left join users u on evt.ackUserId=u.id left join userEvents ue on evt.id=ue.eventId WHERE evt.rtnTs IS NULL AND evt.rtnApplicable IN (?) AND evt.ackTs IS NULL AND evt.alarmLevel >= 1 ORDER BY evt.activeTs DESC OFFSET ? ROWS FETCH NEXT ? ROWS ONLY]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 'OFFSET'.
    

    posted in Mango Automation Installation read more
  • T
    turboblade

    ok another query. How can i copy my DGLux installation across from my other Mango GUID. I tried copying the entire DGLux folder to the ...\web\modules folder but now I have no DGLux at all in Mango.

    posted in Mango Automation Installation read more
  • T
    turboblade

    OK i have been able to start a new install of mango successfully with an MSSQL database. The only problem now is the GUID doesnt match my license. How can I fix this? Hopefully i wont have to purchase a new license.

    Also, would the MSSQL convert work for the already established Mango installation if I disabled the Watch List module or did this only work because it is a fresh install?

    posted in Mango Automation Installation read more
  • T
    turboblade

    Thank you for getting back to me. What exactly is the watch list module used for?

    Will I be able to transfer my dglux design across to the new database

    posted in Mango Automation Installation read more
  • T
    turboblade

    Any further developments on this. I find it hard to believe
    that MS sql has not been successfully used by anyone yet.

    I am currently running Mango from a virtual XP PC. Do you think this could cause issues?

    posted in Mango Automation Installation read more