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 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
<== Date ==> <== Thread ==>

Subject: RE: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time.
From: Yann Mandza via Tech-talk <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>, Torsten Bögershausen <tboegi at edom.se>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sat, 11 May 2024 17:22:48 +0000

Hey Mark,

> What do you observe with the code you showed in the last message?

Here are some logs,

 

caput DRVASYN:MOD0-VoltageRamp 4

Old : DRVASYN:MOD0-VoltageRamp 0

New : DRVASYN:MOD0-VoltageRamp 4

// Added a print line in devAsynFloat64 processCallbackOutput and writeFloat64 for some info on the time variable.

ETHHAL : ( processCallbackOutput ) : time: '0'

ETHHAL : ( writeFloat64 ) : time: '169054678'

2024/05/11 19:15:20.169 ETHHAL:writeFloat64: function=0, value=4.000000

2024/05/11 19:15:20.169 DRVASYN:MOD0-VoltageRamp devAsynFloat64::processCallbackOutput process value 4.000000

 

caget -a DRVASYN:MOD0-VoltageRamp

DRVASYN:MOD0-VoltageRamp <undefined> 4

 

Regards,

 

Yann

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Saturday, May 11, 2024 7:13 PM
To: Yann Mandza <yann.mandza at ess.eu>; Torsten Bögershausen <tboegi at edom.se>; tech-talk at aps.anl.gov
Subject: Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time.

 

What do you observe with the code you showed in the last message?

 

Mark

 

 


From: Yann Mandza <yann.mandza at ess.eu>
Sent: Saturday, May 11, 2024 11:50 AM
To: Torsten Bögershausen <tboegi at edom.se>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>; Mark Rivers <rivers at cars.uchicago.edu>
Subject: RE: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time.

 

Hey Torsten, Mark pitched in, but I forgot to add you in my response.

> Do you call setTimeStamp() ?

 

Here the implementation for my write method. Testing for normal async with caput first.

 

asynStatus drvAsynIsegHalService::writeFloat64( asynUser *pasynUser, epicsFloat64 value )

{

 

  static const char *functionName = "writeFloat64";

 

  const char *propertyName;

  epicsTimeStamp timeStamp;

  char sVal[WRITE_BUF_LEN];

  int function = pasynUser->reason;

  asynStatus status = asynSuccess;

 

  epicsSnprintf( sVal, WRITE_BUF_LEN, "%f", value );

/*call driver methods and return asynError if write operation fails*/

       

// Get current IOC time.

epicsTimeGetCurrent( &timeStamp  );

       

// tried this without success.

setTimeStamp(&timeStamp);

 

  // update value of parameter

  status = ( asynStatus ) setDoubleParam( function, value );

  status = ( asynStatus ) callParamCallbacks( );

  if( status )

    epicsSnprintf( pasynUser->errorMessage, pasynUser->errorMessageSize,

                   "%s:%s: status=%d, function=%d, value=%f",

                   session_, functionName, status, function, value );

  else

    asynPrint( pasynUser, ASYN_TRACEIO_DEVICE,

               "%s:%s: function=%d, value=%f\n",

              session_, functionName, function, value );

  return status;

}

 

Regards,

 

Yann

-----Original Message-----
From: Torsten Bögershausen <tboegi at edom.se>
Sent: Saturday, May 11, 2024 4:57 PM
To: Yann Mandza <yann.mandza at ess.eu>; tech-talk at aps.anl.gov
Subject: Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time.

 

 

 

On 2024-05-11 13:39, Yann Mandza via Tech-talk wrote:

> Dear all,

> 

> I am working onan Asyn Port driver using with asynR4-42 on a Linux

> machine. Am trying to add timing support for Output record using

> TSE=-2 and

> 

> and info(asyn:READBACK, "1"). When I caget an output PV with TSE=-2

> after caput to it the time obtained is <undefined> though the value is

> well written to the device.

> 

> A camonitor on a PV with TSE=-2 and info(asyn:READBACK, "1") show an

> <undefined> time too though the read value is correct. I would like to

> associate the device timestamp to the record for output readback, and

> the current time return by epicsTimeGetCurrent to the record after a

> caput. In my poller thread this is how I set the time stamp:

> 

> epicsUInt32 seconds = 0;

> 

> epicsUInt32 microsecs = 0;

> 

> epicsTimeStamp time;

> 

> sscanf( timeStampLastChanged/*hardware time string*, "%u.%u",

> &seconds, &microsecs ) != 2 )

> 

> time.secPastEpoch = seconds - POSIX_TIME_AT_EPICS_EPOCH;

> 

> time.nsec = microsecs * 100000;

> 

> pasynUser->timestamp = time;

 

Do you call setTimeStamp() ?

 

 


Replies:
Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Mark Rivers via Tech-talk
References:
Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Yann Mandza via Tech-talk
Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Torsten Bögershausen via Tech-talk
RE: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Yann Mandza via Tech-talk
Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Mark Rivers via Tech-talk
Next: Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Mark Rivers 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: Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Mark Rivers via Tech-talk
Next: Re: Output record with TSE=-2 and info(asyn:READBACK, "1") returns <undefined> time. Mark Rivers 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
ANJ, 11 May 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·