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

Subject: AW: [asyn] link already open!
From: "Zimoch Dirk" <[email protected]>
To: "Pavel Maslov" <[email protected]>, "EPICS Tech Talk" <[email protected]>
Date: Mon, 12 Aug 2013 20:44:48 +0200


-----Ursprüngliche Nachricht-----
Von: Pavel Maslov [mailto:[email protected]]
Gesendet: Mo 12-Aug-13 15:07
An: Zimoch Dirk; EPICS Tech Talk
Betreff: Re: [asyn] link already open!
 
But can you compile a support module (that is using asyn and/or
streamdevice) without including base.dbd in the support module's Makefile?
It doesn't work for me as I had this error message during build:


Yes, I can. But I had to replace expand.dbd with a more "stupid" version, i.e. without strict testing. It simple expands the includes. The rest is done at run-time. Thus loading fails when the menu is not there, but not building. I had to do this trick only for record types. Drivers already workes before.

Then I add the (generated) registerRecordDeviceDriver for the module and compile it as a shared library.

When loading, I load the shared library, the module.dbd file and call the register function. Works like a charm.

Unfortunately it is broken on 3.15 because the new parser is more whimpy. I would have to generate registerRecordDeviceDriver myself. Too much pain at the moment.

Dirk


make[3]: Entering directory
`/home/pmaslov/epics/apps/asyn/asynSup/asynSupApp/src/O.linux-x86_64'
perl /opt/codac-4.0/epics/base/bin/linux-x86_64/makeIncludeDbd.pl asyn.dbd
drvAsynSerialPort.dbd drvAsynIPPort.dbd  asynSupInclude.dbd
echo "../O.Common/asynSupInclude.dbd : ../Makefile" >> asynSup.dbd.d
Expanding dbd
Error: menu not found
    at or before ")" in path "/opt/codac-4.0/epics/base/dbd"  file
"dbCommon.dbd" line 32
 in path "/opt/codac-4.0/epics/modules/asyn/dbd"  file "asynRecord.dbd"
line 112
 in path "/opt/codac-4.0/epics/modules/asyn/dbd"  file "asyn.dbd" line 9
 in file "../O.Common/asynSupInclude.dbd" line 1
Error: syntax error
   dbExpand: Input errors, no output generated


-- 
Regards,


Pavel Maslov, MS


On Mon, Aug 12, 2013 at 2:55 PM, Dirk Zimoch <[email protected]> wrote:

> On 12.08.2013 14:08, Pavel Maslov wrote:
>
>> I think I have understood the origin of these messages. A possible
>> remedy is not to include base.dbd in the "main" IOC, because it has
>> already been included in the support module's dbd file.
>> Thanks to all who helped!
>>
>
> When I build loadable modules, I use base.dbd only in the main IOC, but
> not in the module. My module .dbd contains only what is defined inside the
> module itself.
>
> Dirk
>
>
>> --
>> Regards,
>>
>>
>> Pavel Maslov, MS
>>
>>
>> On Mon, Aug 12, 2013 at 9:48 AM, Pavel Maslov <[email protected]
>> <mailto:pavel.masloff@gmail.**com <[email protected]>>> wrote:
>>
>>     Hi Dirk,
>>
>>     Thanks for a good pointer - my asyn and streamdevice versions didn't
>>     match! Now everything works.
>>     I get a couple of warnings, though. Do you know what they say?
>>
>>     registryFunctionRefAdd: could not register asSubInit
>>     Warning -- iocshRegisterVariable redefining asCaDebug.
>>     Warning -- iocshRegisterVariable redefining dbRecordsOnceOnly.
>>     Warning -- iocshRegisterVariable redefining dbBptNotMonotonic.
>>
>>
>>
>>     --
>>     Regards,
>>
>>
>>     Pavel Maslov, MS
>>
>>
>>     On Mon, Aug 12, 2013 at 9:06 AM, Dirk Zimoch <[email protected]
>>     <mailto:[email protected]>> wrote:
>>
>>         On 09.08.2013 17:05, Pavel Maslov wrote:
>>
>>             Mark, I cannot do anything to StreamDevice records - I mean
>>             I can caget
>>             and caput, but everytime they get processed - those error
>>             messages pop
>>             up. And the PVs are invalid all the time never change
>>             values. This said,
>>             I can talk to my Java Simulator using asynrecord:
>>             dbpf lambda1-ps:asyn.AOUT "*idn?"
>>             , and I get the response. No problem. So it's StreamDevice
>>             that produces
>>             these errors (as you pointed out). Also, I don't think that
>>             my Java
>>             Simulator is slow. I tried your solution to lengthen the
>>             auto connect
>>             time but the problem still remains.
>>
>>             What I am confident in, though, (sorry for not telling this
>>             before) is
>>             that it has to do with the fact that I am loading
>>             asyn+streamdevice
>>             support module dynamically (from iocsh).
>>             When I use it the normal EPICS way - everything is fine as
>>             it should be.
>>
>>
>>         I do the same and that works for me. But you have to be careful:
>>         Are you sure that you load the same version of asyn that you
>>         used to compile StreamDevice?
>>
>>         Sometimes the binary API of asyn changes from one version to
>>         another (although the source API is the same). That happens when
>>         functions pointers in the function tables get re-ordered in a
>>         new asyn version.
>>
>>         Dirk
>>
>>
>>
>>
>>
>>             --
>>             Regards,
>>
>>
>>             Pavel Maslov, MS
>>
>>
>>             On Fri, Aug 9, 2013 at 4:14 PM, Mark Rivers
>>             <[email protected] <mailto:[email protected].**edu<[email protected]>
>> >
>>             <mailto:[email protected]._**_edu
>>
>>             <mailto:[email protected].**edu <[email protected]>>>>
>> wrote:
>>
>>                  You have created the port with autoconnect disabled.
>>               Thus, I expect
>>                  the error message that says that queueRequest failed,
>>             because the
>>                  port is not connected.  But then asynReport says that
>>             the port is
>>                  connected.  This must be because StreamDevice connected
>>             it?  But
>>                  once it is connected then your StreamDevice records
>>             should work
>>                  correctly.  Do they?  If you force an input or output
>>             record to
>>                  process does it work?
>>
>>                  One possibility for your problem is that your Java
>>             server takes
>>                  longer than 0.5 second to connect.   If a port has
>>             autoconnect
>>                  enabled, then when the port is first connected asyn
>>             will try to
>>                  connect to it, but it will only wait 0.5 seconds by
>>             default.  You
>>                  can lengthen that time to 2 seconds, for example with
>>             this command
>>                  before you create the IP port.
>>
>>                  asynSetAutoConnectTimeout 2.0
>>
>>                  You can also try to wait for the port to connect in
>>             your startup
>>                  script with this command:
>>
>>                  asynWaitConnect(const char *portName, double timeout)
>>
>>                  i.e.
>>
>>                  asynWaitConnect("lambda1", 2.0)
>>
>>                  right after your drvAsynIPPortConfigure command.
>>
>>                  Mark
>>
>>                  ______________________________**____
>>
>>                  From: Pavel Maslov [[email protected]
>>             <mailto:pavel.masloff@gmail.**com <[email protected]>>
>>             <mailto:pavel.masloff@gmail.__**com
>>
>>             <mailto:pavel.masloff@gmail.**com <[email protected]>
>> >>]
>>
>>                  Sent: Friday, August 09, 2013 9:00 AM
>>                  To: Mark Rivers; EPICS Tech Talk
>>                  Subject: Re: [asyn] link already open!
>>
>>                  Hi Mark!
>>
>>                  The error occurs at iocInit (since my PVs have
>>             PINI=YES) and each
>>                  time I read/write via CA.
>>                  The server is a Java Device Simulator at
>>             localhost:7001. It is
>>                  always running and it never disconnects. All of my PVs
>>             are marked
>>                  Invalid. In fact they have not been initialized.
>>                  I have tried with noAutoConnect=1 and this is what i get:
>>
>>                  epics> 2013/08/09 15:48:06.034504 CAS-client
>>                  lambda-ps:PWR_OUTPUT:RBV lockRequest:
>>             pasynManager->queueRequest()
>>                  failed: port lambda1 not connected
>>
>>
>>                  epics> asynReport 2
>>                  lambda1 multiDevice:No canBlock:Yes autoConnect:No
>>                       enabled:Yes connected:Yes numberConnects 1
>>                       nDevices 0 nQueued 0 blocked:No
>>                       asynManagerLock:No synchronousLock:No
>>                       exceptionActive:No exceptionUsers 2
>> exceptionNotifys 0
>>                       interposeInterfaceList
>>                           asynOctet pinterface 0x7fdceea29800 drvPvt
>>             0x1c6f820
>>                       interfaceList
>>                           asynCommon pinterface 0x7fdceea26c60 drvPvt
>>             0x1c6c270
>>                           asynOctet pinterface 0x1c6c2f8 drvPvt 0x1c6c270
>>                       Port 127.0.0.1:7001 <http://127.0.0.1:7001>
>>             <http://127.0.0.1:7001><http:/**__/127.0.0.1:7001
>>
>>             <http://127.0.0.1:7001>>: Connected
>>
>>                                       fd: 9
>>                       Characters written: 0
>>                          Characters read: 0
>>
>>
>>
>>
>>                  --
>>                  Regards,
>>
>>
>>                  Pavel Maslov, MS
>>
>>
>>                  On Fri, Aug 9, 2013 at 3:16 PM, Mark Rivers
>>             <[email protected] <mailto:[email protected].**edu<[email protected]>
>> >
>>             <mailto:[email protected]._**_edu
>>             <mailto:[email protected].**edu <[email protected]>
>> >><mailto:rivers@cars.__uch**icago.edu <http://uchicago.edu>
>>             <mailto:[email protected].**edu <[email protected]>
>> >
>>
>>             <mailto:[email protected]._**_edu
>>
>>             <mailto:[email protected].**edu <[email protected]>>>>>
>> wrote:
>>                  Please provide some more information:
>>
>>                  - When does the error occur?  At iocInit when
>>             connecting to the
>>                  device for the first time?  When the server first comes
>>             on line?
>>                    When the server is restarted?
>>
>>                  - The server is at port 7001 on the localhost.  Is that
>>             server
>>                  always running when the IOC is running?  Does the
>>             server disconnect
>>                  after each transaction?
>>
>>                  You have created the drvAsynIPPort with the default
>>             value of 0 for
>>                  the last 3 parameters, so it is using noAutoConnect=0,
>>             which means
>>                  that asynManager will automatically try to connect the
>>             port before
>>                  queuing a request.  If the connection attempt fails
>>             then asynManager
>>                  will not queue the request.  So I am having a hard time
>>                  understanding how StreamDevice found the port
>>             disconnected, unless
>>                  your server disconnected in the time between when
>>             asynManager queued
>>                  the request and when StreamDevice was called.
>>
>>                  Mark
>>
>>
>>                  ______________________________**____
>>                  From: [email protected]
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>
>> >
>>             <mailto:tech-talk-bounces@aps.**__anl.gov
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>
>> >><mailto:tech-talk-__**[email protected]<[email protected]>
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>
>> >
>>             <mailto:tech-talk-bounces@aps.**__anl.gov
>>
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>
>> >>>
>>                  [[email protected]
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>
>> >
>>             <mailto:tech-talk-bounces@aps.**__anl.gov
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>
>> >><mailto:tech-talk-__**[email protected]<[email protected]>
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>
>> >
>>
>>             <mailto:tech-talk-bounces@aps.**__anl.gov
>>
>>             <mailto:tech-talk-bounces@aps.**anl.gov<[email protected]>>>>]
>> on behalf of Pavel
>>             Maslov
>>                  [[email protected] <mailto:pavel.masloff@gmail.**
>> com <[email protected]>>
>>             <mailto:pavel.masloff@gmail.__**com
>>             <mailto:pavel.masloff@gmail.**com <[email protected]>
>> >><mailto:pavel.masloff@__g**mail.com <http://gmail.com>
>>             <mailto:pavel.masloff@gmail.**com <[email protected]>>
>>
>>             <mailto:pavel.masloff@gmail.__**com
>>
>>             <mailto:pavel.masloff@gmail.**com <[email protected]>
>> >>>]
>>                  Sent: Friday, August 09, 2013 4:20 AM
>>                  To: EPICS Tech Talk
>>                  Subject: [asyn] link already open!
>>
>>                  Hello all,
>>
>>                  When can this message pop up:
>>
>>                  2013/08/09 11:03:11.051131 lambda1
>> lambda-ps:CURR:MAX:RBV:
>>                  pasynCommon->connect() failed: 127.0.0.1:7001
>>             <http://127.0.0.1:7001>
>>             <http://127.0.0.1:7001><http:/**__/127.0.0.1:7001
>>             <http://127.0.0.1:7001>><http:**//127.0. <http://127.0.>
>> __0.1:7001
>>
>>             <http://127.0.0.1:7001>>:
>>
>>                  Link already open!
>>                  2013/08/09 11:03:11.052968 lambda1
>>             lambda-ps:CURR:MAX:RBV: Protocol
>>                  aborted
>>
>>
>>
>>                  --
>>                  Regards,
>>
>>
>>                  Pavel Maslov, MS
>>                  Controls Engineer
>>
>>
>>
>>
>>
>>
>>
>



Replies:
Re: AW: [asyn] link already open! Andrew Johnson
References:
[asyn] link already open! Pavel Maslov
RE: [asyn] link already open! Mark Rivers
Re: [asyn] link already open! Pavel Maslov
RE: [asyn] link already open! Mark Rivers
Re: [asyn] link already open! Pavel Maslov
Re: [asyn] link already open! Dirk Zimoch
Re: [asyn] link already open! Pavel Maslov
Re: [asyn] link already open! Pavel Maslov
Re: [asyn] link already open! Dirk Zimoch
Re: [asyn] link already open! Pavel Maslov

Navigate by Date:
Prev: Re: motor record: continuously update limit switches Konrad, Martin
Next: Re: AW: [asyn] link already open! Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [asyn] link already open! Andrew Johnson
Next: Re: AW: [asyn] link already open! Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·