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  2020  2021  2022  2023  2024  <2025 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  <2025
<== Date ==> <== Thread ==>

Subject: Subject:When I implement curve hiding and realising by modifying the StripChart.traces properties, the curves in StripChart are all cleared and reset. How to solve this problem
From: wjj686702 via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at epics.anl.gov" <tech-talk at epics.anl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 14 Apr 2025 14:37:00 +0800 (GMT+08:00)
Subject:When I implement curve hiding and realising by modifying the StripChart.traces properties, the curves in StripChart are all cleared and reset. How to solve this problem
From:C.C.Wang  wjj686702 at 163.com

Hi:
my css-version is phoebus4.7.3
    In my sytem has to many PV to display by StripChart, and they need to be in the same StripChart, So it's not convenient to set it up with the visible option in toolbar.
   pv is DEV001:CH0 DEV001:CH1 DEV001:CH2 DEV001:CH3 DEV002:CH0 DEV002:CH1 DEV002:CH2 DEV002:CH3 ............DEV100:CH0 DEV100:CH1 DEV001:CH2 DEV001:CH3  and so on. There are multiple devices, each with 4 channels of data.
   Now, Select DEVnum from a Combo Box, and select ch0-ch3 from four Check boxes, In this way, the curve can be displayed or not displayed
   I tried several ways to control display and hiding in the StripChart's python Script ,  Although both control the display and hiding of curves, but they all triggered the curve to clear and reset.
Here is the code snippet
     Method 1: Set trace_type  
    if ch0_selected == 1:
        widget.setPropertyValue('traces[0].trace_type', 2) #2 is Step type
    else:
        widget.setPropertyValue('traces[0].trace_type', 0) #0 is Nono
   
    Method 2: Set trace_color
   
from org.csstudio.display.builder.model.properties import WidgetColor
HIDDEN_COLOR = WidgetColor(0, 0, 0, 0)

if ch0_selected == 1:
        DEFAULT_COLORS[0] = WidgetColor(0, 0, 255, 255)
        print("set trace 0 color", DEFAULT_COLORS[0])
        widget.setPropertyValue('traces[0].color', DEFAULT_COLORS[0])
    else:
        print("set trace 0 clear", HIDDEN_COLOR)
        widget.setPropertyValue('traces[0].color', HIDDEN_COLOR)
   
    Method 3:Change Pv to local Pv
    if ch0_selected == 1:
        print("set trace 0 to dev_pv")
        widget.setPropertyValue('traces[0].y_pv', "DEV002:CH0")
    else:
        print("set trace 0 to dummy pv")
        widget.setPropertyValue('traces[0].y_pv', "loc://dummy")
    
How to solve this problem?

Best regards

Navigate by Date:
Prev: Re: Re: Re: write and read functions in asyn 高振华 via Tech-talk
Next: Re: Link error in MRF event system due to reference clock glitch Hong, Ran 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  <2025
Navigate by Thread:
Prev: Re: Re: Re: Re: write and read functions in asyn Érico Nogueira Rolim via Tech-talk
Next: EPICS build problem Federico Galdenzi 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  <2025
ANJ, 15 Apr 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·