Apply a background image with the desired dimensions.
Posts made by SteveE
-
RE: Change available window size of graphical view
-
RE: Converting from Derby to MySQL
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.
-
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.
-
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'.
-
-
RE: Export -> import
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.
-
RE: Point hierachy
It might be faster to export the point hierarchy, edit the json by hand, and then reimport.
-
RE: Spurious readings...
I would first check that I was using the correct data types. It's easy to get the byte-swapping wrong.
-
RE: Addition for two modbus address
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.
-
RE: Y-axis scaling in image chart
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
-
-
RE: ScriptPoint usage
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.
-
RE: ScriptPoint usage
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.
-
ScriptPoint usage
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.
-
-
RE: ScriptPoint usage
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.
-
-
RE: Illegal Function alarm
I apologize for not posting this sooner, but I was too embarrassed. Your comments about whether these points are really coil and input status finally sank in. These are actually bits packed into input and holding registers, but I was trying to get them from the coil and input status ranges. (Doh!) So, I wrote meta data points to access the individual bits in the registers. This works fine, but is a bit slow. I'll create a new topic to discuss how to make this faster.
Thanks and sorry for my modbus ignorance.
-
RE: Using "Contiguous batches only" causes exceptions
When I observe this in the eclipse debugger, I see ReadFunctionGroups with lengths of 314 and 803. These lengths are greater than ModbusUtils.MAX_READ_REGISTER_COUNT (i.e, 125). The exception is thrown when the ReadNumericRequest constructor discovers this.
I have over 900 modbus data points in various ranges. I will attempt to upload the json for these.
Attachment: download link
-
Using "Contiguous batches only" causes exceptions
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 -
RE: Using "Contiguous batches only" causes exceptions
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 -
RE: Event unix command - do I need special characters quoted
I don't see any unusually-named files in that listing, which was my first guess. I can reproduce the error message by embedding a carriage return in the command immediately before the ;. For example:
$ find . -type "*" -exec ls -l "{}"^M;
find: missing argument to '-exec'(I inserted the ^M by typing ctrl-V<CR>.) So my next guess is that you have a hidden carriage return or non-printable character in the command itself.
-
RE: Event unix command - do I need special characters quoted
I believe that apostrophe on the second line matches the one on the first line before the word "find":
...Process error: 'find: missing argument to '-exec'
^
What does the contents of the directory look like (ls or ls -l)? -
RE: Watchlist issues
BTW, the misplacement of input popups only occurs in internet explorer; Firefox works fine.
-
Watchlist issues
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.