Add log scaling property to Meter widget#3764
Add log scaling property to Meter widget#3764shroffk merged 8 commits intoControlSystemStudio:masterfrom
Conversation
|
Thanks @shroffk for the review. Would it be possible to merge this in or does it need a second review? |
|
@rjwills28, I'm having issues with this. Attached screen recording shows a case where a random number 0 - 10000 is displayed on a meter with scale 0 - 10000. But maybe I'm missing something? Also, it would be nice if we can reuse the same label for the property as (for instance) the Linear Meter widget, i.e. Screen.Recording.2026-04-10.at.09.32.39.mov |
|
Hi @georgweiss - thank you for testing. How are you setting the limits? Is this from a PV or manually? Essentially I think what is happening is that the lower limit is set to 0. There is then a calculation that does I wasn't sure how to fix this issue of 0 as the lower limit. Essentially we shouldn't use it in the calculations and should just use some very small number close of 0 instead. But I wasn't sure whether we actually wanted to hardcode that in and what the very small number should be. Any thoughts on that? As I said, this could also be fixed for other widgets. |
|
@rjwills28, thanks for your feed-back. |
|
Ah I see - @georgweiss thanks for pointing that out. So that is the expected behaviour? And thanks for the suggesting of changing the log scale property label to match other similar widgets. I had been using the one from p.s. sorry for all the commits to fix the quality check - these were things I had missed but should now be compliant. |
I'm just saying that |
See app/rtplot/src/main/java/org/csstudio/javafx/rtplot/internal/util/Log10.java |
Using log10 method will sent it to a huge negative number and not NaN.
|
Good progress! Yes, there can always be a follow-up to fine-tune the ticks |
Used when converting widgets in an OPI file to BOB.
|
One final change here as I changed the widget log scale property to match the LinearMeter widget so instead of |
|
All the widget properties use |
|
@kasemir - yes I see your point. I was following what was done for the LinearMeter widget but now I look at it I'm not sure why they set the property to be called I'm going to undo my last commit and change the property back to |
|
A newly added or "extra" widget is of course free to do whatever it wants when introducing new properties, but all the common widget properties, see https://github.com/ControlSystemStudio/phoebus/blob/master/app/display/model/src/main/java/org/csstudio/display/builder/model/properties/CommonWidgetProperties.java or the original https://github.com/kasemir/org.csstudio.display.builder/blob/master/org.csstudio.display.builder.model/src/org/csstudio/display/builder/model/properties/CommonWidgetProperties.java going back to 2015 used for example |
Revert the change to the conversion which is no longer needed.
|
|
Thanks for the clarification @kasemir and apologies for my misunderstanding and back-and-forth with commits. I think we should be there now! |
|
No worries, and thanks for adding the log support! |




I noticed that the old Meter widget in CS-Studio had the option of using a log scale but that this is missing in the Phoebus Meter widget.
This PR adds the code needed to support log scaling in the meter widget following what is implemented for the RTTank widget. The only real bit of logic needed is in MeterScale.java, otherwise it is pretty much boilerplate.
Checklist
Testing:
Documentation: