Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can PyDM accept a float for precision? (MEDM valuator widget) #79

Open
prjemian opened this issue Oct 25, 2021 · 2 comments
Open

Can PyDM accept a float for precision? (MEDM valuator widget) #79

prjemian opened this issue Oct 25, 2021 · 2 comments
Labels
question Further information is requested

Comments

@prjemian
Copy link
Contributor

Can PyDM accept a float for precision? (MEDM valuator widget) Precision seems as if it should be an integer value while a float shows a roundoff level. In that case, we should compute an integer by -log10(float_precision) but what to do for precision 1.2 truncated to 1 reported while converting from std-R3-6-2/stdApp/op/adl/Nano2k.adl?

valuator {
	object {
		x=3
		y=136
		width=243
		height=35
	}
	control {
		chan="$(P)$(S)$(p)_set_position.VAL"
		clr=14
		bclr=3
	}
	label="outline"
	clrmod="alarm"
	dPrecision=1.200000
}

Originally posted by @prjemian in #73 (comment)

@prjemian prjemian changed the title Can PyDM accept a float for precision? (MEDM valuator widget) _Precision_ seems as if it should be an integer value while a float shows a roundoff level. In that case, we should compute an integer by -log10(float_precision) but what to do for precision 1.2 truncated to 1 reported while converting from [std-R3-6-2/stdApp/op/adl/Nano2k.adl](https://github.com/epics-modules/std/blob/abc769a3fe9f8699d3fcc68e25465da4c1b7f8b7/stdApp/op/adl/Nano2k.adl#L102-L117)? Can PyDM accept a float for precision? (MEDM valuator widget) Oct 25, 2021
@prjemian prjemian added the question Further information is requested label Oct 25, 2021
@prjemian prjemian added this to the initial release milestone Oct 25, 2021
@prjemian
Copy link
Contributor Author

The valuator documentation states:

Valuator/Scale

The valuator/scale object has several modes of operation, which implement fine/coarse sensitivity, as well as direct value selection.

Dragging the valuator/scale with MB1 depressed moves and transmits values proportional to the range of the valuator scaled into the width of the valuator (usually >= 1% for this application, depending upon the selected width of the valuator). Clicking MB1 on either side of the valuator selector moves and transmits a value increment or decrement of specified precision (for this application) of the valuator object. Clicking Control-MB1 on either side of the valuator selector moves and transmits a value increment or decrement of 10x specified precision of the valuator object.

In addition to the normal mouse-activated mode of usage for the valuator/scale, the arrow keys and shift key take on functions as well. Fine-grained Increment and Decrement are accomplished with the up/down or left/right arrow keys, depending upon the orientation of the valuator/scale. The slider will move in the direction "pointed to" by the arrow key being pressed (as expected), when input focus is set to that widget. For instance, will move the slider by +1 precision unit when the orientation is HORIZONTAL and processingDirection is MAX_ON_RIGHT.

In conjunction with increment/decrement, the key can be used to specify a coarse-grained increment/decrement. Hence, , for instance, will move the slider by +10 precision units when the orientation is VERTICAL and processingDirection is MAX_ON_TOP.

The specified precision for motion of the valuator is specified in a dialog box which is popped up by depressing MB3 in the valuator/scale. A series of toggle buttons with values of log10(precision) are selectable, with the current precision indicated by the depressed toggle.

Also, for the highest precision modification of associated process variables, the keyboard entry dialog box can be used to specify a direct-entry value to be written to the valuator and channel.

@prjemian
Copy link
Contributor Author

Needs a demonstration with the MEDM "slider" widget (which is described in the .adl file as a valuator object. The precision (dPrecision) is a floating-point step size to use when motion is directed by the arrow buttons.

Is there other use for the precision in this instance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant