EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Displaying string Waveform in CaQtDM
From: Paul Nord via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 19 May 2020 16:49:30 -0500
Mark,

I guess they agree.  They both show nothing.

$ cainfo name
name
    State:            connected
    Host:             redacted.gov:5064
    Access:           read, write
    Native data type: DBF_STRING
    Request type:     DBR_STRING
    Element count:    999
$


On Tue, May 19, 2020 at 4:43 PM Mark Rivers <rivers at cars.uchicago.edu> wrote:

OK, so it looks like the problem is the server, not the client.  caget and caQtDM agree, correct?

 

What does cainfo show?

 

Mark

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Paul Nord via Tech-talk
Sent: Tuesday, May 19, 2020 4:35 PM
To: tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Displaying string Waveform in CaQtDM

 

That's exactly the same.


$ caget -S name
name 999                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

 

On Tue, May 19, 2020 at 4:31 PM Mark Rivers <rivers at cars.uchicago.edu> wrote:

You used a lowercase –s, it should be uppercase.

 

caget –S name

 

Mark

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Paul Nord via Tech-talk
Sent: Tuesday, May 19, 2020 4:26 PM
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Displaying string Waveform in CaQtDM

 

$ caget -s name
name 999                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
$

 

It appears that there are probably 999 blank spaces.

 

Paul

 

 

On Tue, May 19, 2020 at 4:17 PM Mark Rivers <rivers at cars.uchicago.edu> wrote:


What happens if you do:

caget -S name

from the Linux or Windows shell?

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 3:59 PM
To: EPICS tech-talk
Subject: Re: Displaying string Waveform in CaQtDM

Thanks, Mark.

But that doesn't work.  I don't see any of my text appear.

Is there an example using the python ioc that works?

Or, can you make a CaQtDM window work with the code I included?

Paul


On Tue, May 19, 2020 at 1:44 PM Mark Rivers <rivers at cars.uchicago.edu<mailto:rivers at cars.uchicago.edu>> wrote:
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<mailto:tech-talk-bounces at aps.anl.gov>> on behalf of Paul Nord via Tech-talk <tech-talk at aps.anl.gov<mailto:tech-talk at aps.anl.gov>>
Sent: Tuesday, May 19, 2020 1:21 PM
To: tech-talk at aps.anl.gov<mailto: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


References:
Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
Re: Displaying string Waveform in CaQtDM Mark Rivers via Tech-talk
Re: Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
Re: Displaying string Waveform in CaQtDM Mark Rivers via Tech-talk
Re: Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
RE: Displaying string Waveform in CaQtDM Mark Rivers via Tech-talk
Re: Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
RE: Displaying string Waveform in CaQtDM Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Displaying string Waveform in CaQtDM Johnson, Andrew N. 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Displaying string Waveform in CaQtDM Paul Nord via Tech-talk
Next: EPICS Frame Documentation Pilar Gil 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  <20202021  2022  2023  2024 
ANJ, 21 May 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·