[Logo] Mango Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Modbus data processing  XML
Forum Index » User help
Author Message
hck333

Initiate

Joined: 10/05/2007 05:29:59
Messages: 3
Offline

Hi,

I'm trying to set a sensor network using modbus data sources. I've runned into some problems regarding data processing.

It seems that mango isn't reacting to different Multiplier / Additive settings in "Modbus locator properties". I've tried restarting, disabling/enabling of a point and nothing seemed to help.

The second problem I've figured out is in the "Modbus data type" setting. Even if I set it to "2 byte unsigned integer" the data are processed as *signed.

For example: input data 0xFFF0 --> reads as -16

Is there some solution for this or I'm doing something wrong?

Radek
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1502
Offline

Hi Radek,

Thanks for pointing out these problems. They are in fact bugs that have now been fixed and will be in an incremental release that we will make available soon (probably within a week or so).

In particular, the multiplier/additive fields were not actually implemented in the data source; this has now been corrected. Numeric values read from the Modbus network will be multiplied and added to. Numeric values that are set in the network will be divided and subtracted from. Note that for the latter case the number that is set by the user will be logged even if that is not the actual number that the network accepts (e.g. fractional values that are discarded by integer registers.)

The data type conversion problem was caused by the Modbus library due to missing "& 0xff" operations. This too has been fixed.

Watch for release 0.8.1 for these fixes and other minor changes.

This message was edited 1 time. Last update was at 10/05/2007 13:44:27


Best regards,
Matthew Lohbihler
hck333

Initiate

Joined: 10/05/2007 05:29:59
Messages: 3
Offline

Thanks for a reply, I'm glad to help improving Mango

If you have time, please look on another problem I've found out.

Imagine I have a light bulb and a light switch. Light switch is implemented via modbus holding register (write only) and a light bulb is represented as modbus input register (read only). I have also a light sensor connected as modbus input register (read only).

Then I set an event handler : if a light sensor value is below 'X' switch on the light. If above some value 'Y' switch it off.

If I'm switching a light manually with writing '0' or '1' to holding register, everything is working. But the change caused by event handler isn't processed. The number related to holding register changes, but the event isn't send to modbus master.

Regards,
Radek

mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1502
Offline

Hi Radek,

Nice catch. The set point handler was calling an incorrect API to update the point value. I've attached a patch which should fix the problem for you. Please let me know if it does. Just overwrite the existing class files with the one in the zip.
 Filename MangoPatch.zip [Disk] Download
 Description Patch for release 0.8.1
 Filesize 27 Kbytes
 Downloaded:  161 time(s)


Best regards,
Matthew Lohbihler
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1502
Offline

BTW, that patch will likely only work with version 0.8.1. Make sure you upgrade first before you install it.

Best regards,
Matthew Lohbihler
hck333

Initiate

Joined: 10/05/2007 05:29:59
Messages: 3
Offline

It needs longer testing, but for now I can say it's ok.

Multiplication / addition and also events are processed fine. Thanks!

Radek
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1502
Offline

Glad to hear. Thanks for the feedback Radek.

Best regards,
Matthew Lohbihler
 
Forum Index » User help
Go to:   
Powered by JForum 2.1.9 © JForum Team