Closed prjemian closed 3 years ago
Still a problem with files pre-converted adl2pydm
. Probably something that can be changed here to resolve.
On the pre-converted screen, the "All Stop" button works correctly (it stops the motors when pressed).
Each of the three Moving
widgets are QLabel
rather than PyDMLabel
and this is why they don't change color when the motor is moving and why they don't disappear when the motor is not moving. Also, don't forget the ca://
protocol prefix when using a PV in a display rule.
In the .adl
file those widgets all show a "dynamic attribute"
part with varying chan=
and vis=
"dynamic attribute" {
vis="if zero"
chan="gp:alldone.VAL"
}
Summary table:
geometry | clr (color code) |
vis= |
chan= |
textix= |
---|---|---|---|---|
(351, 79, 80x25) | 54 | if zero |
gp:alldone.VAL |
Moving |
(352, 80, 80x25) | 54 | if not zero |
gp:alldoneBlink.VAL |
Moving |
(350, 78, 80x25) | 50 | if zero |
gp:alldone.VAL |
Moving |
Edited the xxx.ui
file (with Qt's designer
), promote the three QLabel widgets to PyDMLabel and edit the rules
property to prepend ca://
, such as:
[{"name": "visibility", "property": "Visible", "channels": [{"channel": "ca://gp:alldone.VAL", "trigger": true}], "expression": "ch[0]==0"}]
and this produced the proper display blinking when a motor is moving and no text when all motors are not moving.
Note gp:
is the specific IOC prefix, not the xxx:
in the source file.
Note the PV is present in the original converted .ui
file but the <widget class="QLabel" name="text">
should be a PyDMLabel
and the ca://
protocol prefix is missing from the PV.
This same configuration is seen in the adl2pydm/tests/medm/xxx-R6-0.adl
file in the repo.
On the xxx.adl screen, the
Moving
indicator is not changing and theAll Stop
button is not responding. On the plus side, the pop-up menu works.Originally posted by @prjemian in https://github.com/BCDA-APS/adl2pydm/issues/60#issuecomment-949885704
Is this problem due to adl2pydm or PyDM itself? Suspect the former, relating to string handling in python 3.
(edited) Actually related to #55.