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  <20142015  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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Changing the Timeout for drvAsynSerialPort?
From: Dirk Zimoch <[email protected]>
To: <[email protected]>
Date: Tue, 16 Dec 2014 13:58:22 +0100
On 11.12.2014 02:47, Franklin Fuller wrote:
Hi all,

Question is: How can I changed the timeout for drvAsynSerialPort?
Context follows (maybe I'm asking the wrong question):

I've been working through a tutorial* with few modifications.  So far no
problems until I try to initiate communication with a Stanford Research
Systems PS365 HV supply.  When I run ./st.cmd, everything says it
initializes, but then I get a message saying that the ioc did not
receive a response within 1 second.  The exact error(s) are:

2014/12/10 17:31:18.937952 L0 ps365controlTestIDN: No reply from device
within 1000 ms

2014/12/10 17:31:20.039439 L0 ps365controlTestIDNwf: No reply from
device within 1000 ms

http://epics.web.psi.ch/software/streamdevice/doc/protocol.html#sysvar

ReplyTimeout = 5000;




Further, if I query the ioc with "caget -S ps365controlTestIDNwf", I get
this:

ps365controlTestIDNwf \003

CA.Client.Exception...............................................
     Warning: "Identical process variable names on multiple servers"
     Context: "Channel: "ps365controlTestIDNwf", Connecting to:
198.128.196.226:5064 <http://198.128.196.226:5064>, Ignored:
franklins-mbp.dhcp.lbl.gov:5064 <http://franklins-mbp.dhcp.lbl.gov:5064>"
     Source File: ../cac.cpp line 1298
     Current Time: Wed Dec 10 2014 17:44:31.920218000

I can "manually" communicate with the device using a simple screen
command.  I use the same port address with 9660/8/N/1 standard settings.
It seems to take a second, maybe 2, to open the connection.  So my
thought was that maybe I just need to have the asyn driver increase its
timeout time to avoid this error.

I can't see a way to change the timeout, however.

* The tutorial in question:
http://www.aps.anl.gov/epics/modules/soft/asyn/R4-21/HowToDoSerial/HowToDoSerial_StreamDevice.html

My st.cmd is given below:

#!../../bin/darwin-x86/ps365controlTest


##########################################
# Setup Environment
< envPaths
epicsEnvSet "STREAM_PROTOCOL_PATH" "$(TOP)/db"

##########################################
# Allow PV prefixes and serial port name to be set from the environment
epicsEnvSet "P" "$(P=ps365control)"
epicsEnvSet "R" "$(R=Test)"
epicsEnvSet "TTY" "$(TTY=/dev/ttyUSB)"

##########################################
# Register all support components
cd ${TOP}
dbLoadDatabase(dbd/ps365controlTest.dbd)
ps365controlTest_registerRecordDeviceDriver(pdbbase)

##########################################
# Set up ASYN ports
drvAsynSerialPortConfigure("L0","$(TTY)",0,0,0) #sets up a port L0 at
$TTY (see above)
#now we fill in the details of the port connection
#9600/8/N/1 is the most typical serial port configuration
asynSetOption("L0",-1,"baud","9600"
asynSetOption("L0",-1,"bits","8")
asynSetOption("L0",-1,"parity","none")
asynSetOption("L0",-1,"stop","1")
asynSetOption("L0",-1,"clocal","Y")
asynSetOption("L0",-1,"crtscts","N")


##########################################
## Load record instances
dbLoadRecords("db/devps365control.db","P=$(P),R=$(R),PORT=L0,A=0")

##########################################
# Start EPICS
cd ${TOP}/iocBoot/${IOC}


References:
Changing the Timeout for drvAsynSerialPort? Franklin Fuller

Navigate by Date:
Prev: Re: pyepics "Virtual circuit disconnect" CA.Client.Exception Matt Newville
Next: Re: pyepics "Virtual circuit disconnect" CA.Client.Exception Walter Werner
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Changing the Timeout for drvAsynSerialPort? Mark Rivers
Next: about signal generator's control 徐广磊
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·