[Logo] Serotonin Software Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
multistate instead of numeric  XML
Forum Index » User help
Author Message
craig

Initiate

Joined: 06/08/2007 16:50:46
Messages: 144
Offline

Hi,
I've got a variable read from a 2 byte signed register over modbus IP.
It can only take on values of 1,2,3,4,etc. In mango on the data source screen the type of this point is numeric and I can't change it to multistate.

I can use the "Range" text renderer and use ranges of 1-1,2-2,etc so the appropriate text is displayed instead of 1 or 2.

In the graphical view multistate image renderer works as well but some flexibility is lost when the type is numeric instead of multistate. For instance I can't assign the same image to multiple states.

Should I convert this numeric to a multistate with a meta point or is there someway to assign the data type of this point to multistate?

Thanks for the help
Craig
mlohbihler

Master
[Avatar]

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

The meta point solution would do it, yes. Maybe we can add to the list to allow modbus points to be multistate.

Best regards,
Matthew Lohbihler
craig

Initiate

Joined: 06/08/2007 16:50:46
Messages: 144
Offline

Is this as simple as editing com.serotonin.mango.view.text so that


reads





I can't see any downsides...
mlohbihler

Master
[Avatar]

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

You'd have to make sure the implementation handles a Double value type. It probably only handles Integer. And the configurater would probably need to be updated too.

Best regards,
Matthew Lohbihler
craig

Initiate

Joined: 06/08/2007 16:50:46
Messages: 144
Offline

adding Numeric datatype to the multistate renderer seems like it might be the wrong way to go about it...

Better to add mango multistate datatype to the modbus data point locator: I think I will add a select option to the pointlocator dialog to select either numeric or multistate when a numeric modbusDataType is specified.

I suppose I will have to modify the format the blob pointlocator data is stored in as well to store this additional field.
craig

Initiate

Joined: 06/08/2007 16:50:46
Messages: 144
Offline

i've got this working, I'll send it along in a few months when it is properly tested.
 
Forum Index » User help
Go to:   
Powered by JForum 2.1.9 © JForum Team