I realized that I can set those values from a script, but that they won’t read from a PV. I think I have a path forward for next week. Thanks,
Greg
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of
Leblanc, Gregory via Tech-talk
Sent: Friday, June 30, 2023 5:42 PM
To: Tynan Ford <TFord at lbl.gov>
Cc: tech-talk at aps.anl.gov
Subject: RE: [External] Re: Phoebus Increased Slider Sensitivity?
Hi Tynan,
That sounds like exactly what I’m trying to do! Since it worked for you, I went ahead and tried it again. I created a record in my database (though I guess local PVs would work):
record(ao, "$(P)$(R):AmplitudeMax") {
field(DESC, "Slider Maximum Amplitude")
field(VAL, "50")
}
And I have this widget in my .bob file:
<widget type="scaledslider" version="2.0.0">
<name>Scaled_Slider_Current</name>
<pv_name>ca://PCU50_300test:Amplitude</pv_name>
<x>41</x>
<y>320</y>
<width>540</width>
<height>60</height>
<show_hihi>false</show_hihi>
<show_high>false</show_high>
<show_low>false</show_low>
<show_lolo>false</show_lolo>
<increment>0.001</increment>
<minimum></minimum>
<maximum>ca://PCU50_300test:AmplitudeMax</maximum>
<limits_from_pv>false</limits_from_pv>
</widget>
When I check out the error log I see:
2023-06-30 17:39:03 WARNING [org.csstudio.display.builder.model] Widget 'Scaled_Slider_Current' (scaledslider) property maximum cannot evaluate 'ca://PCU50_300test:AmplitudeMax'
Followed by a bunch of other related info. I don’t have pva working on this IOC at the moment, but it looks to me like it’s processing that as text rather than evaluating it. Probably some kind of syntax error on my end.
Greg
Use caution with links and attachments.
We recently migrated our injector tuning applications from an in-house C# app to Phoebus and we had success with that. One difference is that our operators are using physical knobs with USB connections that map to keystrokes. So they never
are actually clicking on the slider widget. Arrow key presses once the slider is in focus should work better for you than dragging the slider but that can be cumbersome.
The reason I write to you though is that we dynamically assign the PV name, Maximum, Minimum, and Increment properties for the Scaled Slider widget. Check to make sure you uncheck the "Limits from PV" property on the slider widget.
Our injector tuning screen contains a bunch of Phoebus Action buttons, one for each magnet. Each button has 4 macros: CNTL_PV, MAX, MIN, GAIN. When a button is clicked, it assigns that specific magnet PV to the scaled slider. And it also
writes the MAX, MIN, GAIN macro values to corresponding PVs. Then the Scaled Slider widget has rules to change the corresponding properties. For instance: whenever the Gain PV changes, use the new value for the Increment property. When the Min PV changes,
update the slider Minimum property, etc.
There are also two action buttons next to the scaled slider where the operator can manually change the Gain PV value up or down by an order of magnitude. That lets them fine tune things. The trick is that the Gain PV adjusts the sensitivity
of the USB knob which is handled through a little custom "driver".
Hi,
I'm still sorting out the best way to control the magnets that we use to steer the particle beam through our beamlines. I like the slider control because it mimics our current operation, and it feels intuitive when tuning beam. Our existing control software
allows operators to drag slider to a desired current for setting the current to the coarsest value. The controls also have buttons that allow the user to select progressively finer controls allowing very precise tuning of the magnet parameters. The "FINE"
button affects the controls operation in 2 ways. First, it adjusts the step size that the current moves when the operator single-clicks within the slider. On the 0 to 50 slider, it moves 0.625 per click in coarse, 0.15 in medium, 0.04 in fine, 0.01 in extra
fine, and 0.0025 in super fine. Second, it adjusts the speed which the slider moves when the mouse is dragged within the slider area. That is, the mouse position is de-coupled from the slider indicator on all the scales below coarse. The operator might
drag the cursor 50mm on the screen, but the slider indicator might only move 1 mm.
I don't think there is a way to accomplish this exact behavior using Phoebus, which is OK if I can find another solution.
My first attempt was to make the limits of the scaled slider dynamic, and to have them pull their value from another element in the HMI, or from another PV. Everything I tried had the slider back to the 0-100 scale, so I'm assuming that those can't be set
on the fly. The next thought I had was to add a choice button over the top of the slider and split the slider into 5-ish sub-sections. Divide 250A down to 50A, then 50A down to 10A, and see if that gets me enough resolution to set the magnet. I think this
might work, but I'm not totally happy with it (plus I can't find documentation on how to use choice button to launch additional displays).
TL; DR: How do you control PVs that have a large overall range but need the ability to change by very fine increments?
Greg
--
Gregory Leblanc
Accelerator Engineer
Edwards Accelerator Lab - Ohio University
123 University Terrace
Athens, OH 45701 USA
leblanc at ohio.edu
M: (401) 52-OUAL1 or (401) 526-8251
|