• S
    SteveE

    I'm writing custom jsp pages, and I need a some help understanding how to use scriptPoint tags. I've read the graphical view dox that discusses server side scripts, but am still confused. :oops:

    <view:scriptPoint xid="DP_123456" raw="true">
    // my script goes here
    </view:scriptPoint>

    • Is the script executed on the server or is it sent back to the browser for execution?

    • What variables are available within the script? It looks like the script will be called with 'value' and 'time' arguments; is that all that are available?

    • Can I call java code through a dwr from this script?

    What I'm trying to do is take a metapoint string value and use it as a key in a <fmt:message> tag. Alternatively, I would like to take a modbus integer error code value and send it to a java method to produce the localized message.

    Thanks for any help anyone can provide.

    posted in User help read more
  • S
    SteveE

    When I enable "Contiguous batches only" on my modbus ip datasource, mango produces the following exceptions in the mango tomcat log everytime mango attempts to poll:

    ERROR 2010-09-22 10:48:49,907 (org.quartz.core.JobRunShell.run:211) - Job com.serotonin.mango.rt.dataSource.PollingDataSource.PollingDataSource-8 threw an unhandled Exception:
    com.serotonin.ShouldNeverHappenException: com.serotonin.modbus4j.exception.ModbusTransportException: Invalid number of registers: 314
    at com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.doPoll(ModbusDataSource.java:252)
    at com.serotonin.mango.rt.dataSource.PollingDataSource.scheduleTimeout(PollingDataSource.java:79)
    at com.serotonin.mango.util.TimeoutJob.execute(TimeoutJob.java:46)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Caused by: com.serotonin.modbus4j.exception.ModbusTransportException: Invalid number of registers: 314
    at com.serotonin.modbus4j.base.ModbusUtils.validateNumberOfRegisters(ModbusUtils.java:77)
    at com.serotonin.modbus4j.msg.ReadNumericRequest.<init>(ReadNumericRequest.java:17)
    at com.serotonin.modbus4j.msg.ReadInputRegistersRequest.<init>(ReadInputRegistersRequest.java:10)
    at com.serotonin.modbus4j.ModbusMaster.sendFunctionGroup(ModbusMaster.java:329)
    at com.serotonin.modbus4j.ModbusMaster.send(ModbusMaster.java:280)
    at com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.doPoll(ModbusDataSource.java:176)
    ... 4 more
    ERROR 2010-09-22 10:48:49,907 (org.quartz.core.ErrorLogger.schedulerError:2185) - Job (com.serotonin.mango.rt.dataSource.PollingDataSource.PollingDataSource-8 threw an exception.
    org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.serotonin.ShouldNeverHappenException: com.serotonin.modbus4j.exception.ModbusTransportException: Invalid number of registers: 314]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Caused by: com.serotonin.ShouldNeverHappenException: com.serotonin.modbus4j.exception.ModbusTransportException: Invalid number of registers: 314
    at com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.doPoll(ModbusDataSource.java:252)
    at com.serotonin.mango.rt.dataSource.PollingDataSource.scheduleTimeout(PollingDataSource.java:79)
    at com.serotonin.mango.util.TimeoutJob.execute(TimeoutJob.java:46)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    ... 1 more
    Caused by: com.serotonin.modbus4j.exception.ModbusTransportException: Invalid number of registers: 314
    at com.serotonin.modbus4j.base.ModbusUtils.validateNumberOfRegisters(ModbusUtils.java:77)
    at com.serotonin.modbus4j.msg.ReadNumericRequest.<init>(ReadNumericRequest.java:17)
    at com.serotonin.modbus4j.msg.ReadInputRegistersRequest.<init>(ReadInputRegistersRequest.java:10)
    at com.serotonin.modbus4j.ModbusMaster.sendFunctionGroup(ModbusMaster.java:329)
    at com.serotonin.modbus4j.ModbusMaster.send(ModbusMaster.java:280)
    at com.serotonin.mango.rt.dataSource.modbus.ModbusDataSource.doPoll(ModbusDataSource.java:176)
    ... 4 more

    posted in User help read more
  • S
    SteveE

    When I create a watchlist with more items that can fit in my browser window, I can scroll to see them, of course, but for those that are settable, the input form pops up in the wrong location on the page; sometimes it appears (I presume) in a location that has scrolled out of view, giving the impression that it hasn't popped up at all. Has this been fixed in 1.10.0? (I'm on 1.9.0.)

    Also regarding watchlists, why are we not allowed to export/import them? Would it be difficult to add json support for them?

    Thanks.

    posted in Mango feedback read more
  • S
    SteveE

    I am reading data from a modbus ip device and have data points configured to access coil status registers. When these points are enabled, I receive alarms like the following:

    'Measurements A': Baseline A1 P1 WL1: Illegal function

    What does this mean?

    Here's the configuration of a typical point:

            "loggingType":"ON_CHANGE",
            "intervalLoggingPeriodType":"MINUTES",
            "intervalLoggingType":"INSTANT",
            "purgeType":"YEARS",
            "pointLocator":{
                "range":"COIL_STATUS",
                "modbusDataType":"BINARY",
                "additive":0.0,
                "bit":0,
                "multiplier":1.0,
                "offset":110,
                "settableOverride":true,
                "slaveId":1,
                "slaveMonitor":false
            },
            "eventDetectors":[
            ],
            "engineeringUnits":"",
            "chartRenderer":{
                "type":"IMAGE",
                "timePeriodType":"MINUTES",
                "numberOfPeriods":60
            },
            "dataSourceXid":"DS_DATA_A",
            "defaultCacheSize":1,
            "discardExtremeValues":false,
            "discardHighLimit":1.0E-4,
            "discardLowLimit":-1.0E-4,
            "enabled":false,
            "intervalLoggingPeriod":15,
            "name":"Baseline A1 P1 WL1",
            "purgePeriod":1,
            "textRenderer":{
                "type":"BINARY",
                "oneColour":null,
                "oneLabel":"On",
                "zeroColour":"#ff0000",
                "zeroLabel":"Off"

    posted in User help read more
  • S
    SteveE

    I'm able to import mango into eclipse and resolve the build path issues by adding external jar j2ee.jar and adding all jars in war/WEB-INF/lib).

    My trouble starts when I attempt to convert the project to a faceted dynamic web project:

    1. Project-&gtProperties-&gtProject Facets-&gtConvert to faceted form...

    2. Select Dynamic Web Module

    3. Click Further configuration available... which brings up the Web Module form

    4. On the Web Module form, change the Content directory from WebContent to war

    5. Uncheck Generate web.xml deployment descriptor, then OK

    6. Back on the Project Facets form, select JavaServer Faces

    7. Click on Further configuration required... and go through the process of downloading the JSF 2.0 (Mojarra 2.0.2-FCS) library

    8. When I finally click OK on the Properties form and eclipse rebuilds the workspace, I get the following error:

      Errors occurred during the build.
      Errors running builder 'JavaScript Validator' on project 'Mango'.
      java.lang.NullPointerException

    Additionally, a bunch of html and javaScript files now show errors. (Note that eclipse automatically added the JavaScript facet when adding the Dynamic Web Module facet.) Performing a clean build results in the same JavaScript Validator error.

    So, how do I (a) fix the JavaScript validator and (b) resolve the JavaScript and html syntax problems? Any help will be greatly appreciated; I've been working on this for several days.

    posted in User help read more
  • S
    SteveE

    When I attempt to view mango .jsp files with the eclipse web page editor, it fails with the following exception. Has anyone else experienced this?

    java.lang.NullPointerException
    at org.eclipse.jst.jsf.core.internal.tld.CMUtil.getStandaloneTLDURI(CMUtil.java:129)
    at org.eclipse.jst.jsf.core.internal.tld.CMUtil.getURIFromTaglibRecord(CMUtil.java:117)
    at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteHelper.configPaletteItemsByTLD(PaletteHelper.java:100)
    at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.registerTldFromClasspath(PaletteItemManager.java:205)
    at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.initFromProject(PaletteItemManager.java:181)
    at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.init(PaletteItemManager.java:147)
    at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.<init>(PaletteItemManager.java:130)
    at org.eclipse.jst.pagedesigner.editors.palette.impl.PaletteItemManager.getInstance(PaletteItemManager.java:72)
    at org.eclipse.jst.pagedesigner.editors.palette.DesignerPaletteRootFactory.createPaletteRoot(DesignerPaletteRootFactory.java:94)
    at org.eclipse.jst.pagedesigner.editors.SimpleGraphicalEditor.getPaletteRoot(SimpleGraphicalEditor.java:484)
    at org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.setEditDomain(GraphicalEditorWithFlyoutPalette.java:145)
    at org.eclipse.jst.pagedesigner.editors.SimpleGraphicalEditor.<init>(SimpleGraphicalEditor.java:165)
    at org.eclipse.jst.pagedesigner.editors.HTMLEditor.sash_createAndAddDesignSourcePage(HTMLEditor.java:259)
    at org.eclipse.jst.pagedesigner.editors.HTMLEditor.createPages(HTMLEditor.java:439)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
    ...

    posted in User help read more
  • S
    SteveE

    After placing a component into a graphical view and clicking on the computer monitor icon to edit the graphical renderer, I get a "Unknown runtime error" dialog from the browser, and I'm unable to edit the renderer. I'm running Mango 1.9.0, Tomcat 6.0.20, and IE7.

    posted in User help read more
  • S
    SteveE

    To help me get an idea of what is possible with Mango, I was wondering if anyone would be willing to share some screenshots of graphical views or custom views they have created. Thanks!

    posted in Stories read more
  • S
    SteveE

    Apply a background image with the desired dimensions.

    posted in User help read more
  • S
    SteveE

    I'm running Mango 1.9.0 and recently converted my derby db to mysql version 5.5.8. I ran into a couple of issues which I was able figure out and fix. Note: these issues may have already been addressed in the newer versions of Mango.

    1. There is a new version of the mysql java connector jar available from the mysql website. Download mysql-connector-java-5.1.14.tar.gz, unzip it, and place mysql-connector-java-5.1.14-bin.jar in WEB-INF/lib directory.

    2. Several sql scripts and db upgrade source files used a deprecated mysql keyword in 'create table' statements. Search for 'type=InnoDB' and replace with 'engine=InnoDB'.

    posted in User help read more
  • S
    SteveE

    I've run into the same issue with meta points referred to by other meta points. The importer requires an object to exist at the time it is referred to by another object, but, unfortunately, the exporter does not guarantee to order them appropriately. Until someone fixes the exporter, you will have to edit the exported json and move referent objects above the obects that refer to them. Hopefully, that's not too many for you.

    posted in User help read more
  • S
    SteveE

    It might be faster to export the point hierarchy, edit the json by hand, and then reimport.

    posted in User help read more
  • S
    SteveE

    I would first check that I was using the correct data types. It's easy to get the byte-swapping wrong.

    posted in User help read more
  • S
    SteveE

    You will first need to define a Modbus data source and add your two points to it. Then take a look at the Meta Data Source. You can use the two modbus data points as input to a meta data point that combines them using javascript.

    posted in Hardware read more
  • S
    SteveE

    Scalable y-axis would be a useful feature. Also:

    • Multiple y-axes so you can show two different but perhaps related quanties in the same chart

    • The ability to plot something other than time on the x-axis

    posted in How-To read more
  • S
    SteveE

    After looking at the code I now understand the difference between script point (simply passed on to the browser for execution) and metapoint javascript (executed in the server). My situation is that I have integer error codes coming from the device which need to be turned into localized error messages. There's also a bit of logic involved because of relationships between error codes, so the best option for me is to collect these error code datapoints in a metapoint and process them in java code (via javascript and importClass) and return a localized string message. I've completed the code, and it works quite nicely!

    A nice addition to Mango for users who don't mind writing java code would be java-enabled metapoints. Configuration would include the java class and method to call, perhaps via an xml bean configuration. In this way, the metapoins could bypass the creation of the javascript execution engine and go right to java.

    posted in User help read more
  • S
    SteveE

    I think I figured out how to do this. I read up on the metapoint dox and noticed that Mango's implementation of javascript is Rhino. Rhino provides the functions importClass() ana importPackage() which allow you access to java code from within your javascript. So, I can call out to java code to to perform the localization of messages.

    posted in User help read more
  • S
    SteveE

    I'm writing custom jsp pages, and I need a some help understanding how to use scriptPoint tags. I've read the graphical view dox that discusses server side scripts, but am still confused. :oops:

    <view:scriptPoint xid="DP_123456" raw="true">
    // my script goes here
    </view:scriptPoint>

    • Is the script executed on the server or is it sent back to the browser for execution?

    • What variables are available within the script? It looks like the script will be called with 'value' and 'time' arguments; is that all that are available?

    • Can I call java code through a dwr from this script?

    What I'm trying to do is take a metapoint string value and use it as a key in a <fmt:message> tag. Alternatively, I would like to take a modbus integer error code value and send it to a java method to produce the localized message.

    Thanks for any help anyone can provide.

    posted in User help read more