EPICS Home

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

Subject: Fwd: Question regarding a waveform record and writeOctet
From: Mark Rivers via Tech-talk <tech-talk@aps.anl.gov>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 2 Jul 2019 15:30:53 +0000
Forgot to cc tech-talk again

Sent from my iPhone

Begin forwarded message:

From: Mark Rivers <rivers@cars.uchicago.edu<mailto:rivers@cars.uchicago.edu>>
Date: July 2, 2019 at 10:29:44 AM CDT
To: "Wlodek, Jakub" <jwlodek@bnl.gov<mailto:jwlodek@bnl.gov>>
Subject: Re: Question regarding a waveform record and writeOctet

Does your driver's writeOctet correctly set nActual?

Sent from my iPhone

On Jul 2, 2019, at 10:15 AM, Wlodek, Jakub via Tech-talk <tech-talk@aps.anl.gov<mailto:tech-talk@aps.anl.gov>> wrote:

Hi all,

I have run into an issue with a waveform record I added to one of my IOCs. It simply stores a filename, and there is a writeOctet function that catches writing to it and makes sure that the filepath is valid. This all seems to work OK - the filepath is checked correctly, and the code is able to access it as expected later on. It all works, aside from the following error message displayed in the IOC shell:

2019/07/02 10:47:37.910 13SIM1:{SimDetector-Cam:1}CV1:FilePath devAsynOctet::writeIt requested 22 but sent 94456003460432 bytes

The entered filepath does in fact have a length of 22 bytes, but I have no idea where the 94456003460432 came from, especially since the remainder of the code seems to be reading the entered string correctly. After further testing, I wrote to the filepath PV again, and got:

2019/07/02 10:47:46.220 13SIM1:{SimDetector-Cam:1}CV1:FilePath devAsynOctet::writeIt requested 23 but sent 0 bytes

Once again, the filepath was processed correctly and worked fine in my code, and it was 23 characters long. After some searching I identified the printout to be in the asyn library here: https://github.com/epics-modules/asyn/blob/187b0a03e5d2cdd696c4203147aebe83ef049cb9/asyn/devEpics/devAsynOctet.c#L636.

My record definition looks as follows:
-----------------------------------------------------
record(waveform, "$(P)$(R)FilePath"){
    field(PINI, "YES")
    field(DTYP, "asynOctetWrite")
    field(INP,  "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))NDCV_FILEPATH")
    field(FTVL, "CHAR")
    field(NELM, "256")
    field(autosaveFields, "VAL")
}

record(waveform, "$(P)$(R)FilePath_RBV"){
    field(DTYP, "asynOctetRead")
    field(INP,  "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))NDCV_FILEPATH")
    field(FTVL, "CHAR")
    field(NELM, "256")
    field(SCAN, "I/O Intr")
}

If anyone could help me identify what might be causing this issue it would be much appreciated.

Regards
-Jakub Wlodek

Replies:
Re: Question regarding a waveform record and writeOctet Wlodek, Jakub via Tech-talk
References:
Question regarding a waveform record and writeOctet Wlodek, Jakub via Tech-talk

Navigate by Date:
Prev: Question regarding a waveform record and writeOctet Wlodek, Jakub via Tech-talk
Next: EtherIP for P3-550 DiMonte, Nicholas 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  <20192020 
Navigate by Thread:
Prev: Question regarding a waveform record and writeOctet Wlodek, Jakub via Tech-talk
Next: Re: Question regarding a waveform record and writeOctet Wlodek, Jakub 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  <20192020