| Author |
Message |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 19/10/2008 18:34:11
|
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
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 20/10/2008 21:49:14
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
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 |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 25/01/2010 21:03:27
|
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...
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 25/01/2010 21:37:58
|
mlohbihler
Master
![[Avatar]](/forum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.png)
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 |
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 26/01/2010 04:52:23
|
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.
|
|
|
 |
![[Post New]](/forum/templates/default/images/icon_minipost_new.gif) 26/01/2010 17:19:31
|
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.
|
|
|
 |
|
|