• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. BigCat
    3. Posts

    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
    B
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 19
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by BigCat

    • Android App based on Modbus4J

      I wanted to let you all know that I got a chance to finally finish up the first beta of my app, Modbus-droid, based on Modbus4J released to the android marketplace, and I could really use some people who want to beta-test for me.

      Here is the link to the market:
      market://search?q=pname:com.bencatlin.modbusdroid

      You can read my blog announcement here:
      http://www.bencatlin.com/2011/01/02/introducing-modbus-droid/

      And the source code and bug tracking is all done at Launchpad:
      https://launchpad.net/modbusdroid

      Take a look, let me know what you think!
      Thanks!
      Ben

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Android App based on Modbus4J

      I wanted to let you all know that I got a chance to finally finish up the first beta of my app, Modbus-droid, based on Modbus4J released to the android marketplace, and I could really use some people who want to beta-test for me.

      Here is the link to the market:
      market://search?q=pname:com.bencatlin.modbusdroid

      You can read my blog announcement here:
      http://www.bencatlin.com/2011/01/02/introducing-modbus-droid/

      And the source code and bug tracking is all done at Launchpad:
      https://launchpad.net/modbusdroid

      Take a look, let me know what you think!
      Thanks!
      Ben

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      I have about an hour of testing running and there are no errors!

      Thanks a ton for all your help. I'm excited to be past this, as now I can hopefully get this released in some form in the next few weeks (a couple more features to implement).

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      I'm testing the latest CVS for everything now. I'll let you know how it goes (so far after a few minutes, no errors).

      Thanks for all the help!

      Ben

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      I'm not sure exactly which version I'm running. I pulled the latest source from the release from the sourceforge page towards the end of the last month, and I believe it was the released, not the head. Probably the 1.02 source package.

      Is there a CVS repository that would be better to pull from for both the Serio.java file and modbus4j source? Is it just the sourceforge one? If there is, I'll update to that.

      As a test today I found a tweak in the modbus simulator I'm testing against that lest me put in delay before a response. I had it set to 1ms in all previous tests. Then today I ran it with the debug=false and a delay of 10, 20, and 30ms - each for about an hour. The 10 and 20 ms tests had 2 errors, but the 30ms delay test is going now for over an hour w/o an error.

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      So this is pretty crazy. I added conn.DEBUG = true; to the TcpMaster.java, and I stopped getting the error. I ran the code for hours, all morning and into the afternoon, without issue.

      I comment that out again, get an error within a minute or two. I've been running it for 15 or 20 minutes now and have 6 of these errors.

      I'm just talking to a modbus simulator from the android emulator, so I know there isn't a network issue. Also the simulator says that it received the read request and sends a response even when the error occurs. And it is sending the same response (with the exception of the changed transaction ID) every time (it has a 'console' like mode where it shows the hex of what it is sending and receiving).

      I reverted my code to the jamodbus version and put similar debug lines in it and it runs fine as well.

      This is a very weird problem now that the debug statement is thrown in the mix. Any ideas on what the debug=true line might be adding into the mix that makes the problem go away?

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      OK, so I implemented all the required methods, and I just had them log error messages for me.

      But my problem that I was tackling is still there, and I get no messages in the android log.

      So, maybe someone can give me a pointer, but here is what I've seen, and where I've tracked it down to:

      I'm polling, about once every second, just reading a set of registers. And it will go along just fine for a while, but at random intervals, it will just stop for about 30 seconds (which is what my timeout is) and then continue.

      I put log messages in throughout (breakpoints suck for a random polling problem) and tracked it down to this line in the TcpMaster.java line:

      
      ipResponse = (IpMessageResponse)conn.send(ipRequest);
      
      

      I put a lot message before and after this line, and the log shows the line before, and then a 30 second pause, and the line after.

      Any ideas on what might be causing this? I can't really dig much further because the send method is in seroUtils.jar, otherwise I would just keep chasing it down.

      I would think that if I time out the connection for some reason the exception handler class I implemented would spit out a log message, but this hasn't been the case.

      Any help is appreciated!
      Thanks

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      Oh, and I was taking a stab at it and it told me that the class MessagingConnectionHandler couldn't be resolved, so I'm wondering if MessagingConnectionListener is actually the right class, or if I'm using the wrong version of the modbus4j (which I pulled from sourceforge).

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      Are there any methods I specifically have to implement in the class that get called when an exception occurs?

      Sorry to be such a bother, I just couldn't find much documentation on it (maybe I'm blind).

      posted in Modbus4J general discussion
      B
      BigCat
    • Pluggable Exception Handler example

      Hi, I'm still sorting my way through this, but I was wondering if anyone could give me a pointer or an example on how to get started using the pluggable exception handler.

      Right now I seem to be disconnecting without any obvious reason as to why, and I'd like to start trapping those events if that is possible.

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Pluggable Exception Handler example

      Hi, I'm still sorting my way through this, but I was wondering if anyone could give me a pointer or an example on how to get started using the pluggable exception handler.

      Right now I seem to be disconnecting without any obvious reason as to why, and I'd like to start trapping those events if that is possible.

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Inverted Byte order

      Good to know, thanks!

      Looking at this made me wonder, using the convenience methods in the TCP master class, and the modbuslocator, is there currently a way to get multiple values.

      Looking at the getValue method, it appears like it utilizes the batch feature, but only with a single read (or multiple registers, but only up to the required number for the specified value type).

      For my app, the user sets the starting register/bit location, and the length they want to read, so I would ideally get some type of array back with the data in it. Then they can also select how to display that data (i.e. float, signed int, unsigned it, word swapped float, etc.)

      Sending that information to the locator and pulling it back out directly from it in that form would be handy.

      In general, I've really liked what you're doing here, and love some of the flexibility in this library over jamodbus (hence why I'm trying to adapt from it), but I'm just trying to get my head around everything, so forgive me if my questions are pretty noob-ish.

      posted in Modbus4J general discussion
      B
      BigCat
    • Inverted Byte order

      I'm wondering if there is a way to handle a non-standard client who swaps the byte order on responses.

      I've run into a couple of scenarios where this happens, and I would like to handle it in the project I'm working on.

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Inverted Byte order

      I'm wondering if there is a way to handle a non-standard client who swaps the byte order on responses.

      I've run into a couple of scenarios where this happens, and I would like to handle it in the project I'm working on.

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Modbus4j on Android

      Yeah, I think that will work. And then for my 'disconnect' button I'll just call the destroy, and re-instance the TCPmaster w/ a new init() if the user tries to re-connect.

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Modbus4j on Android

      So I took out all the RTU and serial parts classes, commented out the masters and slaves in the factory class, and imported the seroUtils into eclipse and it pretty much stopped giving me errors.

      What I'm trying to figure out now is if there is an 'is connected' type of method for any of the masters.

      What I did with jamodbus was span a polling thread that looped as long as the connection wasn't closed for some reason (or until it was interrupted by the UI thread). It was pretty simple cuz they had an isConnected method. But I'm not seeing something analogous in modbus4j.

      Am I blind, or is there a simple way to monitor the connection status?

      Thanks!
      Ben

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Modbus4j on Android

      I'll give it a go, but because Android has its own virtual machine, it doesn't support all the stock java components.

      For jamodbus I had to strip out anything that referenced a serial library.

      I should be able to tackle it this weekend, and I'll see if I can do a modbus4a or something and post it back to the forum.

      On a related note, I thought I read somewhere there are enhancements for polling? Or am I confusing that with the batching (which is pretty cool even if it isn't super applicable for my current plan).

      If there are some enhancements for polling, where might I find some info on that.

      posted in Modbus4J general discussion
      B
      BigCat
    • Modbus4j on Android

      I'm writing a modbus polling app on android, mostly as an excercise in getting my feet wet in android programing.

      I started initially with jamodbus, but I see a few advantages for what I'm doing in modbus4j, but with jamodbus I had to strip out all the serial port references.

      Is that something that would be possible with parts of modbus4j being closed source? Or would that break everything so badly it isn't even funny?

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat
    • RE: Modbus4j on Android

      I'm writing a modbus polling app on android, mostly as an excercise in getting my feet wet in android programing.

      I started initially with jamodbus, but I see a few advantages for what I'm doing in modbus4j, but with jamodbus I had to strip out all the serial port references.

      Is that something that would be possible with parts of modbus4j being closed source? Or would that break everything so badly it isn't even funny?

      Thanks!

      posted in Modbus4J general discussion
      B
      BigCat