Albert,
it seems like there is a problem with the byte order swapping, in your
case probably only the data bytes but not the address bytes have to be
swapped. We'll prepare a new version for you for testing and send it
to your personal mail address directly.
Which operating system are you using exactly?
Kind regards
Jim
On 12/01/2013, Albert Serrero <ajs_tech(a)yahoo.com> wrote:
Here's my situation.
I am reading a 16 bit integer holding register on my serial modbus RTU (by
the way, it works fine with Mango).
On OpenAPC, a value of 0 reads 0. That's ok.
A value of 1 at the controller reads 256 on OpenAPC (2 => 512, 3 => 768, 4
=> 1024, etc.)
The obvious logical assumption is that the byte order is reversed.
But when I UNCHECK the invert byte order on the MODBUS definition under the
"Basic" tab (originally checked), I always read a value of 65521 or xFFF1
on all the mapped registers regardless of their value. There's no question
that there's a problem here.
I have no idea how to modify the source code / recompile - just thought that
you'd guys would like to know that the "Invert byte order" option does not
work (unchecked mode) - seems like a simple to fix to make a simple modbus
RTU functional.
Thanks again.
________________________________
From: Jim Hart <openapc(a)gmail.com>
To: openapc(a)lists.fedorahosted.org
Sent: Thursday, January 10, 2013 5:23 AM
Subject: Re: Modbus
Albert,
thank you for your interest in our products.
The MODBUS plug-ins already support 16 bit integer values. The width
of them depends - conform to the MODBUS specification - on the chosen
IO mode. This mode influences if the data are 8 bit int, 16 bit int or
32 bit float.
In case you need something additional that is outside of the scope of
the MODBUS specification you can add this easily, the sources are open
and available at
https://fedorahosted.org/OpenAPC/browser/plugins/libio_modbus_rtu_master
Alternatively you can let us do this modification as soon as we have
some time for it. In this case we'd need detailed information which IO
mode you're using, how many bytes have to be concatenated and which
byte order they have.
Kind regards
Jim
On 09/01/2013, Albert Serrero <ajs_tech(a)yahoo.com> wrote:
> Hi, I just set up OpenAPC and was running a test project with some
> success.
> I have a low cost modbus controller connected to my Windows 7 PC via
> serial
> USB. Most software platforms that support modbus allow some modification
> of
> the type of data that is expected back from the modbus device: floating
> point vs 16 bit integer at a minimum. My device only supports 16 bit
> integer as many low cost modbus devices do.
>
> Is there a way to specify or adjust for this with the Modbus control?
>
> Thanks in advance.
> ajs
--
Kind regards
Jim Hart
http://www.lasermarkingsoftware.com
http://www.openapc.com
Follow us at Twitter:
https://twitter.com/#!/openapc
_______________________________________________
openapc mailing list
openapc(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/openapc