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

Subject: RE: Asyn timeout
From: Mark Rivers <[email protected]>
To: Hinko Kocevar <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 11 Apr 2017 12:22:36 +0000
Hi Hinko,

What values did you use for mRespSz and timeout in your call to pasynOctetSyncIO->writeRead?  What are the values of nRespActSz and eomReason after the call?

How does the AKI2CTMP100 driver know when it has received a complete response?

Mark

________________________________
From: [email protected] [[email protected]] on behalf of Hinko Kocevar [[email protected]]
Sent: Tuesday, April 11, 2017 4:40 AM
To: [email protected]
Subject: Asyn timeout

Hi,

I have the following code:
...
    status = pasynOctetSyncIO->writeRead(mAsynUserCommand,
        mReq, mReqSz, mResp, mRespSz,
        timeout, &mReqActSz, &mRespActSz, &eomReason);

...

And startup st.cmd:

epicsEnvSet("I2C_IP_PORT",          "AK_I2C_COMM")

# Create the asyn port to talk to the AK-NORD server on command port 1002.
drvAsynIPPortConfigure($(I2C_IP_PORT),"192.168.1.100:1002")
asynSetTraceIOMask($(I2C_IP_PORT),0,255)
asynSetTraceMask($(I2C_IP_PORT),0,255)

I connect to my asyn port driver as so:

AKI2CTMP100Configure($(I2C_TMP100_PORT), $(I2C_IP_PORT), 1, "0x49", 1, 0, 0)

After communicating with the device pasynOctetSyncIO->writeRead() seems to return 1 (asynTimeout) .. see last line of this output:

epics> 2017/04/11 11:10:31.449 AK_I2C_COMM asynManager::queueLockPort locking port
2017/04/11 11:10:31.449 AK_I2C_COMM asynManager::queueLockPort taking mutex 0x7f89a80009d0
2017/04/11 11:10:31.449 AK_I2C_COMM asynManager::queueLockPort queueing request
2017/04/11 11:10:31.449 AK_I2C_COMM addr -1 queueRequest priority 0 not lockHolder
2017/04/11 11:10:31.449 AK_I2C_COMM asynManager::queueLockPort waiting for event
2017/04/11 11:10:31.449 asynManager::portThread port=AK_I2C_COMM callback
2017/04/11 11:10:31.449 AK_I2C_COMM asynManager::queueLockPortCallback signaling begin event
2017/04/11 11:10:31.449 AK_I2C_COMM asynManager::queueLockPortCallback waiting for mutex from queueUnlockPort
2017/04/11 11:10:31.449 AK_I2C_COMM asynManager::queueLockPort got event from callback
2017/04/11 11:10:31.449 AK_I2C_COMM flush
2017/04/11 11:10:31.449 192.168.1.100:1002 flush
2017/04/11 11:10:31.449 192.168.1.100:1002 write.
2017/04/11 11:10:31.449 192.168.1.100:1002 write 12
?
\002\000\t\003H\001\001W\000\001\370\003

02 00 09 03 48 01 01 57 00 01 f8 03
2017/04/11 11:10:31.450 wrote 12 to 192.168.1.100:1002, return asynSuccess.
2017/04/11 11:10:31.450 AK_I2C_COMM wrote
?
\002\000\t\003H\001\001W\000\001\370\003

02 00 09 03 48 01 01 57 00 01 f8 03
2017/04/11 11:10:31.450 asynOctetSyncIO wrote:
?
\002\000\t\003H\001\001W\000\001\370\003

02 00 09 03 48 01 01 57 00 01 f8 03
2017/04/11 11:10:31.450 192.168.1.100:1002 read.
2017/04/11 11:10:31.450 192.168.1.100:1002 read 2
?W
\006W

06 57
2017/04/11 11:10:31.450 AK_I2C_COMM read
?W
\006W

06 57
2017/04/11 11:10:31.450 192.168.1.100:1002 read.
2017/04/11 11:10:31.751 AK_I2C_COMM queueUnlockPort
2017/04/11 11:10:31.751 AK_I2C_COMM asynManager::queueUnlockPort waiting for event
2017/04/11 11:10:31.751 AK_I2C_COMM queueUnlockPort unlock mutex 0x7f89a80009d0 complete.
2017/04/11 11:10:31.751 AKBase:ipPortWriteRead, status=1



I can interpret the data as proper (write and read), number of bytes sent and requested is correct.

I would like to understand if this behavior is intended?

Thanks,
Hinko

Replies:
Re: Asyn timeout Hinko Kocevar
References:
Asyn timeout Hinko Kocevar

Navigate by Date:
Prev: Archiver Appliance established multiple CA connections for one channel Wang, Lin
Next: [AsynPortDriver] "Multiple interrupt callbacks between processing" warning with multiple arrays Paweł Plewiński
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Asyn timeout Hinko Kocevar
Next: Re: Asyn timeout Hinko Kocevar
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024