Hi Paul,
areaDetector has lots of caQtDM files that are autoconverted from medm. These can display waveforms as strings.
This is an example of a text entry widget to input the file path from areaDetector/ADCore/ADApp/op/ui/autoconvert/NDFileBase.ui.
<widget class="caTextEntry" name="caTextEntry_3">
<property name="geometry">
<rect>
<x>166</x>
<y>33</y>
<width>500</width>
<height>20</height>
</rect>
</property>
<property name="fontScaleMode">
<enum>caLineEdit::WidthAndHeight</enum>
</property>
<property name="channel">
<string>$(P)$(R)FilePath</string>
</property>
<property name="foreground">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="background">
<color alpha="255">
<red>115</red>
<green>223</green>
<blue>255</blue>
</color>
</property>
<property name="limitsMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="limitsMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="precisionMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="minValue">
<double>0.0</double>
</property>
<property name="maxValue">
<double>1.0</double>
</property>
<property name="colorMode">
<enum>caLineEdit::Static</enum>
</property>
<property name="formatType">
<enum>string</enum>
</property>
</widget>
The readback field (non-editable) is generated as this:
<widget class="caLineEdit" name="caLineEdit_5">
<property name="geometry">
<rect>
<x>166</x>
<y>10</y>
<width>385</width>
<height>18</height>
</rect>
</property>
<property name="fontScaleMode">
<enum>caLineEdit::WidthAndHeight</enum>
</property>
<property name="channel">
<string>$(P)$(R)FilePath_RBV</string>
</property>
<property name="foreground">
<color alpha="255">
<red>10</red>
<green>0</green>
<blue>184</blue>
</color>
</property>
<property name="background">
<color alpha="255">
<red>187</red>
<green>187</green>
<blue>187</blue>
</color>
</property>
<property name="limitsMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="limitsMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="precisionMode">
<enum>caLineEdit::Channel</enum>
</property>
<property name="minValue">
<double>0.0</double>
</property>
<property name="maxValue">
<double>1.0</double>
</property>
<property name="alignment">
<set>Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="formatType">
<enum>string</enum>
</property>
<property name="colorMode">
<enum>caLineEdit::Static</enum>
</property>
</widget>
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Paul Nord via Tech-talk <tech-talk at aps.anl.gov>
Sent: Tuesday, May 19, 2020 1:21 PM
To: tech-talk at aps.anl.gov
Subject: Displaying string Waveform in CaQtDM
I'm stumped on finding a working example.
I would like to put a long text string into a waveform PV and simply display it using CaQtDM. I believe that I've got the string working since I can access it from other parts of the program. The caMultiLineString widget suggests that it can display a waveform character string as text. But it's not working out.
I'm using the python softioc builder.
from softioc import builder
import numpy as np
a_PV = builder.Waveform("name",length=999,datatype=np.str)
a_PV.set("This is some text")
print(bytes(bytearray(a_PV.get())).decode('ascii'))
But it's not clear how to make that string display in CaQtDM.
Any suggestions? Is there a complete example I could look at?
Paul
- Replies:
- Re: Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
- References:
- Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
- Navigate by Date:
- Prev:
Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
- Next:
Re: PVI Prototype - a framework for specifying the interface to an EPICS driver in a single YAML file Peterson, Kevin M. via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
- Next:
Re: Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|