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  <20212022  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  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Timestamp not updating with pvput and PvaPy
From: KRL Baker - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Veseli, Sinisa" <sveseli at anl.gov>
Date: Tue, 22 Jun 2021 14:32:05 +0000

Hello,

 

I’ve recently been in contact about creating and setting values to PVs with PvaPy, which is now working as expected when manually setting values and timestamps through the library and my own script.

 

However, when testing the program from the command line, I’ve noticed that calling a pvput on a PV created using my program does not automatically change the timestamp, instead the timestamp from the previous message is used. I’ve included an example of the behaviour here:

 

When updating through my own manual pv.set(epics_message) calls in the program:

test::channel:match_alarm:integer 2021-06-22 12:36:41.038  -1 2

test::channel:match_alarm:integer 2021-06-22 12:36:43.041  -1 3 MAJOR DEVICE MATCH ALARM INT triggered

test::channel:match_alarm:integer 2021-06-22 12:36:45.043  -1 4

test::channel:match_alarm:integer 2021-06-22 12:36:47.046  -1 5

 

But when I call pvput from a different terminal to this channel with the following values you can see the timestamp does not update. Similarly, the alarm state logic is not called when the value 3 is entered (when previously it does).

test::channel:match_alarm:integer 2021-06-22 12:36:47.046  -1 9

test::channel:match_alarm:integer 2021-06-22 12:36:47.046  -1 10

test::channel:match_alarm:integer 2021-06-22 12:36:47.046  -1 3

 

My understanding is that this logic will need to be implemented manually within my classes (which I am inheriting from PvObject) to ‘set’ the value of the PV when a pvput is called. However, so far I can’t see where that logic should be implemented, either on the server or in the PvObject itself, or if it should already be happening under the hood because I am not sure how to access the attributes of the PV object from the command line.

 

I’ve managed to get something working that updates the values and timestamps using a forced onWriteCallback but this seems to set the value twice at different timestamps, which isn’t the desired behaviour:

counter 2021-06-22 14:01:34.803  -1 6

counter 2021-06-22 14:01:37.803  -1 6

counter 2021-06-22 14:01:37.808  -1 7

counter 2021-06-22 14:01:40.808  -1 7

counter 2021-06-22 14:01:40.812  -1 8

counter 2021-06-22 14:01:43.812  -1 8

 

Do you have any suggestions for how else to get the external pvput to work with a PV created in PvaPy?

 

Kathryn Baker (she/her)

Software Development for Accelerator Control Systems Graduate

Science and Technology Facilities Council

k.baker at stfc.ac.uk

 

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI.


Navigate by Date:
Prev: Re: [EXTERNAL] StreamDevice support problem: Cannot find a bus named 'L0' for... Hartman, Steven via Tech-talk
Next: DM/GUI for EPICS a comparison Kuldeep Joshi 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: [EXTERNAL] StreamDevice support problem: Cannot find a bus named 'L0' for... Hartman, Steven via Tech-talk
Next: DM/GUI for EPICS a comparison Kuldeep Joshi 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  <20212022  2023  2024 
ANJ, 23 Jun 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·