Hi, Bo
The StreamDevice docs specify the following for I/O Intr records:
> The protocol now receives any input from the device. It also gets a
copy of all input directed to other records.
I believe the input that matches the `in` statement in GetV is what's
passed to GetTime first, then the remaining bytes; none of those will
match what GetTime expects. Could you use the same pattern you used in
GetTime in GetV? Just changing where the non-ignored value is.
Cheers,
Érico
On 22/09/2023 07:15, boj via Tech-talk wrote:
> Dear all
>
> I am implementing a very simple serial communication IOC, where each
> call to the instrument returns all relevant values.
> The StremDevice manual suggests to use "I/O Intr" record processing.
>
> The database, protocol and startup file is given below.
>
> The "V" record is processed as expected, but the "Time" record is
> never updated. If i enable "SCAN, "5 second"" for the "Time" record
> this also works so the protocol is returning valid (using the same out
> string as for the "V" record.
>
> Am I overlooking something here , or is there anyway to debug why the
> record is not processed?
>
> I am running the 3.15 branch of EPICS , under linux using a soft ioc
>
> Thanks in advance for any hints
>
> Bo
>
>
> ** Database file: ENG110_test.db:
>
> record(ai, "$(BASE):V") {
> field(DTYP, "stream")
> field(INP, "@ENG110_test.proto GetV asynstream1")
> field(SCAN, "5 second")
> }
>
> record(ai, "$(BASE):Time") {
> field(DTYP, "stream")
> field(INP, "@ENG110_test.proto GetTime asynstream1")
> field(SCAN, "I/O Intr")
>
> ** Protocol file ENG110_test.proto:
>
> ExtraInput = Ignore;
>
> GetV {
> out "\x02\x05\x95\x61\x03";
> in "%*9r%#4R";
> };
>
> GetTime {
> in "%*9r%*#4R%*#4R%*#4R%*#4R%*#4R%*#4R%#4R";
> };
>
>
> ** Startup file
>
> ## Register all support components
> dbLoadDatabase("/usr/lib/epics/dbd/stream-Ioc.dbd",0,0)
> stream_Ioc_registerRecordDeviceDriver(pdbbase)
>
> #Specify the TCP endpoint and give your 'bus' an arbitrary name eg.
> "asynstream1".
> drvAsynSerialPortConfigure("asynstream1", "/dev/ttyUSB0",0,0,0)
> asynSetOption("asynstream1",-1,"baud","9600")
> asynSetOption("asynstream1",-1,"bits","8")
> asynSetOption("asynstream1",-1,"parity","none")
> asynSetOption("asynstream1",-1,"stop","1")
> asynSetOption("asynstream1",-1,"clocal","Y")
> asynSetOption("asynstream1",-1,"crtscts","N")
>
> ## Load record instances for 8 channel module
> dbLoadRecords("ENG110_test.db","BASE=IntLab2:ENG110")
>
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.
- References:
- "I/O Intr" record not processing boj via Tech-talk
- Navigate by Date:
- Prev:
"I/O Intr" record not processing boj via Tech-talk
- Next:
Re: Monitor timeouts with asyn/StreamDevice, and issues in DRTO with UDP Érico Nogueira Rolim 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:
"I/O Intr" record not processing boj via Tech-talk
- Next:
Synapps CAMAC debian Rute Mendes 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
|