EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  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  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Stream device
From: "Mark Rivers" <[email protected]>
To: "Szalata, Zenon M." <[email protected]>, "Dirk Zimoch" <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Mon, 5 Nov 2007 12:37:34 -0600
Dirk wrote:

> I tried to do some debugging with the asynTrace facility and found
that the problem 
> disappears as soon as I call asynSetTraceMask, even with a 0 mask! 

That is because the asynSetTraceMask causes a call to
asynCommon->connect.  I had suggested this earlier to Zen.  However, I
see that you used an asyn "address" of 8, while I was suggesting 0.
Zen, are you sure you tried adding the asynSetTraceMask with the
subaddress that your @init device is actually using?  

Mark


> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Szalata, Zenon M.
> Sent: Monday, November 05, 2007 12:11 PM
> To: Dirk Zimoch
> Cc: EPICS tech-talk
> Subject: RE: Stream device
> 
> Hi Dirk,
> Unfortunately this does not solve my problem.  I am using 
> epics R3.14.9 and asyn 4-9.  This is the output I get with my 
> simple test soft IOC:
> 
> -------------------------------------
> zms@esaux1 $ ../../bin/linux-x86/atest st.cmd
> #!../../bin/linux-x86/atest
> < envPaths
> epicsEnvSet(ARCH,"linux-x86")
> epicsEnvSet(IOC,"iocagwfg")
> epicsEnvSet(TOP,"/afs/slac.stanford.edu/g/esa/ilc/epics/iocTop/atest")
> epicsEnvSet(ASYN,"/afs/slac/g/esa/ilc/epics/modules/asyn/4-9")
> epicsEnvSet(STRM,"/afs/slac/g/esa/ilc/epics/modules/streamdevice-2-3")
> epicsEnvSet(EPICS_BASE,"/afs/slac/g/esa/ilc/epics/base/R3-14-9-ilc1")
> epicsEnvSet( "STREAM_PROTOCOL_PATH","../../atestApp/Db:.")
> cd /afs/slac.stanford.edu/g/esa/ilc/epics/iocTop/atest
> dbLoadDatabase("dbd/atest.dbd",0,0)
> atest_registerRecordDeviceDriver(pdbbase)
> vxi11Configure( "L0","134.79.64.25",0,0.0,"gpib0",0,0)
> #asynSetTraceMask( "L0",0,255)
> asynSetTraceMask( "L0",8,0)
> dbLoadRecords("db/atest.db","P=AG:")
> cd 
> /afs/slac.stanford.edu/g/esa/ilc/epics/iocTop/atest/iocBoot/iocagwfg
> iocInit()
> Starting iocInit
> ##############################################################
> ##############
> ## EPICS R3.14.9-lcls1 $R3-14-9$ $2007/02/05 16:31:45$
> ## EPICS Base built Oct  2 2007
> ##############################################################
> ##############
> 2007/11/05 09:51:13.140 AG:WFreq: asynError in write: L0 port 
> is not connected
> 
> 2007/11/05 09:51:13.141 AG:WFreq: @init handler failed
> 2007/11/05 09:51:13.141 AG:WFreq: Record initialization failed
> Bad init_rec return value  PV: AG:WFreq ao: init_record
> iocInit: All initialization complete
> epics> 2007/11/05 09:51:23.143 AG:RFreq: asynError in write: 
> L0 port is not conn
> ected
> 
> exit
> zms@esaux1 $
> ---------------------------------------
> 
> Here are my atest.db and atest.proto files:
> ---------------------------------------
> record( ai,"$(P)RFreq"){
>   field( DESC, "read frequency")
>   field( DTYP, "stream")
>   field( SCAN, "10 second")
>   field( PREC, "2")
>   field( EGU,  "Hz")
>   field( INP,  "@atest.proto rFreq L0 8")
> }
> record( ao,"$(P)WFreq"){
>   field( DESC, "write frequency")
>   field( DTYP, "stream")
>   field( SCAN, "Passive")
>   field( PREC, "2")
>   field( EGU,  "Hz")
>   field( OUT,  "@atest.proto wFreq L0 8")
> }
> 
> # file: atest.proto
> 
> Terminator=LF;
> 
> rFreq{ out "FREQ?"; in "%f";}
> wFreq{ out "FREQ %f"; @init{ rFreq;}}
> ---------------------------------------------
> 
> Here is the tail end of constructed atest.dbd file:
> ---------------------------
> device(waveform,INST_IO,asynFloat64ArrayWfOut,"asynFloat64ArrayOut")
> device(asyn,INST_IO,asynRecordDevice,"asynRecordDevice")
> driver(stream)
> driver(drvAsyn)
> registrar(asSub)
> registrar(streamRegistrar)
> registrar(asynRegister)
> registrar(asynInterposeFlushRegister)
> registrar(asynInterposeEosRegister)
> registrar(vxi11RegisterCommands)
> registrar(drvAsynIPPortRegisterCommands)
> registrar(drvAsynSerialPortRegisterCommands)
> variable(asCaDebug,int)
> variable(dbRecordsOnceOnly,int)
> variable(dbBptNotMonotonic,int)
> variable(streamDebug,int)
> ----------------------------------
> 
> And finally, her is atestApp/src/Makefile:
> -----------------------------------
> TOP=../..
> 
> include $(TOP)/configure/CONFIG
> 
> PROD_IOC = atest
> 
> DBD += atest.dbd
> atest_DBD += base.dbd
> atest_DBD += stream.dbd
> atest_DBD += asyn.dbd
> atest_DBD += drvVxi11.dbd
> atest_DBD += atestSup.dbd
> 
> # <name>_registerRecordDeviceDriver.cpp will be created from 
> <name>.dbd
> atest_SRCS += atest_registerRecordDeviceDriver.cpp
> atest_SRCS_DEFAULT += atestMain.cpp
> atest_SRCS_vxWorks += -nil-
> 
> #The following adds support from base/src/vxWorks
> atest_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
> 
> #add a definition for each support application used by this 
> application
> atest_LIBS += stream
> atest_LIBS += asyn
> 
> atest_LIBS += $(EPICS_BASE_IOC_LIBS)
> 
> include $(TOP)/configure/RULES
> ---------------------------------
> 
> Are you using earlier versions of Epics or asyn?  If you are 
> using the same version of these two packages, am I missing 
> something in my Makefile or some other files?
> Thanks for helping,
> Zen
> 
> -----Original Message-----
> From: Dirk Zimoch [mailto:[email protected]] 
> Sent: Monday, November 05, 2007 5:59 AM
> To: Szalata, Zenon M.
> Subject: Re: Stream device
> 
> Hello Zen,
> 
> I tested @init handlers with several devices today. I found 
> that TCP ports as well as serial ports work as expected. The 
> problem only occurs with vxi11 ports.
> 
> However, I got different error messages:
> 
> --------------------------------------------------------------
> 2007/11/05 13:57:32.057 gpib0,8 vxiCreateDeviceLink RPC error 
> : RPC: Timed out
> 
> 2007/11/05 13:57:32.058 L0 vxiCreateDevLink failed for addr 8
> 2007/11/05 13:57:32.058 asynManager::asynConnectCallback, 
> port L0 error calling 
> asynCommon->connect
> 2007/11/05 13:57:36.067 L0 vxi11 clientCall errno 0 clnt_stat 
> 5 L0 vxiBusStatus RPC error : RPC: Timed out
> 
> 2007/11/05 13:57:36.067 L0 asynGpib:srqPoll srqStatus error timeout
> 2007/11/05 13:57:40.077 L0 vxi11 clientIoCall errno 0 clnt_stat 5
> 2007/11/05 13:57:40.077 DZ:cmd: asynError in write: L0 RPC failed
> 
> 2007/11/05 13:57:40.078 DZ:cmd: @init handler failed
> 2007/11/05 13:57:40.078 DZ:cmd: Record initialization failed
> ----------------------------------------------------------------
> 
> StreamDevice error messages start with "asynError in write: 
> L0 RPC failed". All above is drvVxi11 or asynManager.
> 
> I tried to do some debugging with the asynTrace facility and 
> found that the problem disappears as soon as I call 
> asynSetTraceMask, even with a 0 mask!
> 
> Thus try this in your startup script:
> 
> ...
> vxi11Configure( "L0","134.79.64.25",0,0.0,"gpib0",0,0)
> asynSetTraceMask ("L0",8,0)
> ...
> 
> However, I still have not the slightest idea what goes wrong 
> in the vxi11 driver.
> 
> 
> I Hope this helps.
> 
> Dirk
> 
> 


Replies:
RE: Stream device Szalata, Zenon M.
RE: Stream device Szalata, Zenon M.
References:
RE: Stream device Szalata, Zenon M.

Navigate by Date:
Prev: RE: Stream device Szalata, Zenon M.
Next: RE: Stream device Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Stream device Szalata, Zenon M.
Next: RE: Stream device Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·