Thursday, March 22, 2007

OS Project Feature: jamod

Open source is sometimes really fun, if you manage to handle levels of abstraction (I recommend reading some of Alfred Korzybski's work), and you always assume that people don't read manuals or readme documents (if available). When dealing with people's inquiries, it always comes down to patience....

A living example for jamod is:

I have already looked at http://jamod.sourceforge.net but cannot see the relation between Modbus protocol and Java implementation. thanks!!!

I always thought the relation was quite clear: jamod is an implementation of the modbus protocol in Java.

jamod is actually pretty well documented for an OS project, because I initiated this project during my master thesis at the Institute for Automation, University of Leoben, Austria.

If you don't know anything about modbus then you may get started reading the documents in the Knowledge Base. I specifically recommend the one that describes the protocol.

Now, there it says:

At this level Modbus is a stateless client-server protocol (e.g. much like HTTP), based on transactions, which consist of a request (issued by the client) and a response (issued by the server).


They keywords in this quote are transaction, request and response. Funny enough OO allows for a direct representation:

  1. ModbusTransaction

  2. ModbusRequest

  3. ModbusResponse



The rest follows logically, in levels of abstraction. Requests and responses are both messages at a more abstract level, and there are specific requests and responses for modbus functions at a less abstract level. Things do fall in place and suddenly there is a very clear relationship between jamod and the Modbus protocol.......

And then, this is also a little bit what the various How-To documents are trying to transport to their readers. Actually they take you step by step through an example, as can be seen here.

Additionally, for those that find using jamod as OO library too complicated, there is still the option of using a facade pattern class, which you can find in the net.wimpi.modbus.facade package.

At other times, the questions about using jamod are more about the lack of Java knowledge:

Can You help me how to import/introduce java modbus library in to my java code, I would thank you about!


Now, I always suggest the excellent and online Java Tutorial. Also, there is a reason why I put a Target Audience section on the first page of each of my projects, in the case of jamod:

Java developers which need to access or share data using Modbus protocols.


I am tempted to give a free unsolicited career advice: don't call yourself a Java Developer until you know what a JAR is and how to use it. I don't say you need a certification, but at least try to figure out the basics on your own :)

Allthough, there is still an option to even avoid most of the Java side when using jamod, namely, compile it to a native library using gcj. This opens a range of possibilities when you don't want to have a JVM in first place. On the other hand, jamod also has been compiled for and ran on TINI and SNAP, embedded internet enabled platforms that may be interesting for some automatisation applications. Last but not least, jamod has also been used to talk to Industrial equipment, like the Beckhoff BK9000 Remote I/O Coupler.

It is as versatile as Open Source may be and usually when people understand the levels of abstractions and the ideas behind them, they manage to use jamod easily in their projects and products.

1 comments:

Anonymous said...

Hi! I agree with you.
I am currently using JAMod for a project, and even I am new on Modbus I have found lot of documentation in many places.
Some people just does not understand the meaning of RTFM (Read The F..king Manual).
Nice blog.
Regards!

Esteban

Post a Comment