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  2014  2015  2016  2017  2018  2019  <20202021  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  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: serial IOC connection problem
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: "Ivashkevych, Oksana" <oksana at bnl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 9 Dec 2020 21:51:27 +0000
> Could you please elaborate on this, I did see connection errors  before implementing the fix you suggested, right?


Yes, you saw connection errors.  But in the serial_iocLog1.txt file you sent previously, which had the error messages, you had these lines just before iocInit:

#asynSetTraceMask( "FTS",0,255)
#asynSetTraceMask( "FTS",0,0)


So the line disabling the error messages was commented out.

Mark


________________________________
From: Ivashkevych, Oksana <oksana at bnl.gov>
Sent: Wednesday, December 9, 2020 3:39 PM
To: Mark Rivers
Cc: tech-talk at aps.anl.gov
Subject: RE: serial IOC connection problem

Hi Mark,
Thank you very much for being thorough and suspicious.
It still works without errors.
And I gladly express my happy wows one more time. :)
> With this line present you won't even see error messages.

Could you please elaborate on this, I did see connection errors  before implementing the fix you suggested, right?
Oksana

[oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
#!../../bin/linux-x86_64/ftsioc
< envPaths
epicsEnvSet("IOC","ftsioc")
epicsEnvSet("TOP","/home/oksana/ftsioc")
epicsEnvSet("SUPPORT","/opt/epics/support")
epicsEnvSet("ASYN","/opt/epics/support/asyn")
epicsEnvSet("CALC","/opt/epics/support/calc")
epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
epicsEnvSet("STREAM_PROTOCOL_PATH",    "../../ftsiocApp/Db")
epicsEnvSet("PREFIX",                  "XF:16IDC-ES:LIX")
epicsEnvSet("FTS_IP",                  "10.16.2.195:49151 HTTP")
epicsEnvSet("PORT",                    "FTS")
## Register all support components
dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
ftsioc_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP")
## Load record instances
dbLoadRecords("../../db/fts.db","P=XF:16IDC-ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
iocInit()
Starting iocInit
############################################################################
## EPICS R7.0.3.1
## EPICS Base built Dec  1 2020
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncftsioc,"user=oksana"
epics>



> -----Original Message-----
> From: Mark Rivers <rivers at cars.uchicago.edu>
> Sent: Wednesday, December 09, 2020 3:57 PM
> To: Ivashkevych, Oksana <oksana at bnl.gov>
> Cc: tech-talk at aps.anl.gov
> Subject: Re: serial IOC connection problem
>
> Hi Oksana,
>
>
> >  it looks like I forgot to remove asynSetTraceMask( "FTS",0,0).
>
>
> Yes, you should comment out or remove this line.  With this line present you
> won't even see error messages.
>
>
> asynSetTraceMask( "FTS",0,0)
>
> Mark
>
> ________________________________
> From: Ivashkevych, Oksana <oksana at bnl.gov>
> Sent: Wednesday, December 9, 2020 2:53 PM
> To: Mark Rivers
> Cc: tech-talk at aps.anl.gov
> Subject: RE: serial IOC connection problem
>
> Hi Mark,
> Yes, this is exactly what I did , and it looks like I forgot to remove
> asynSetTraceMask( "FTS",0,0).
> Oksana
>
> [oksana@xf16id-babyioc1 ftsioc]$ vim st.cmd
> [oksana@xf16id-babyioc1 ftsioc]$ ../../bin/linux-x86_64/ftsioc st.cmd
> #!../../bin/linux-x86_64/ftsioc < envPaths
> epicsEnvSet("IOC","ftsioc")
> epicsEnvSet("TOP","/home/oksana/ftsioc")
> epicsEnvSet("SUPPORT","/opt/epics/support")
> epicsEnvSet("ASYN","/opt/epics/support/asyn")
> epicsEnvSet("CALC","/opt/epics/support/calc")
> epicsEnvSet("STREAM","/opt/epics/support/StreamDevice")
> epicsEnvSet("DEVIOCSTATS","/opt/epics/support/iocStats")
> epicsEnvSet("AUTOSAVE","/opt/epics/support/autosave")
> epicsEnvSet("EPICS_BASE","/opt/epics/epics-base")
> epicsEnvSet("STREAM_PROTOCOL_PATH",    "../../ftsiocApp/Db")
> epicsEnvSet("PREFIX",                  "XF:16IDC-ES:LIX")
> epicsEnvSet("FTS_IP",                  "10.16.2.195:49151 HTTP")
> epicsEnvSet("PORT",                    "FTS")
> ## Register all support components
> dbLoadDatabase("../../dbd/ftsioc.dbd",0,0)
> ftsioc_registerRecordDeviceDriver(pdbbase)
> drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP"
> ## Load record instances
> dbLoadRecords("../../db/fts.db","P=XF:16IDC-
> ES:LIX,R={FTS:2},PORT=FTS,user=oksana")
> #asynSetTraceMask( "FTS",0,255)
> asynSetTraceMask( "FTS",0,0)
> iocInit()
> Starting iocInit
> ##########################################################
> ##################
> ## EPICS R7.0.3.1
> ## EPICS Base built Dec  1 2020
> ##########################################################
> ##################
> iocRun: All initialization complete
> #asynSetTraceMask( "FTS",0,0)
> ## Start any sequence programs
> #seq sncftsioc,"user=oksana"
> epics> dbl
>
> [oksana@xf16id-babyioc1 Db]$ more fts.proto Timeout=10000; Terminator =
> "";
>
> read{
>     MaxInput = 16;
>     out
> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00%0.2
> r\x00\x00";
>     in "\x12\x34%(A)02r%(B)2r%(C)2r%(D)2r%(E)2r%(F)2r%(G)2r";
> }
>
> readCalibration {
>     MaxInput = 24;
>     out
> "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
> \x00\x00\x00";
>     in
> "\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
> )02r%(J)02r";
>     disconnect;
>     @init {
>         out
> "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00
> \x00\x00\x00";
>         in
> "\x12\x34%(A)01r%(B)01r%(C)04r%(D)04r%(E)02r%(F)02r%(G)02r%(H)02r%(I
> )02r%(J)02r";
>     }
>
> }
>
> [oksana@xf16id-babyioc1 Db]$
>
>
> > -----Original Message-----
> > From: Mark Rivers <rivers at cars.uchicago.edu>
> > Sent: Wednesday, December 09, 2020 3:48 PM
> > To: Ivashkevych, Oksana <oksana at bnl.gov>
> > Cc: tech-talk at aps.anl.gov
> > Subject: Re: serial IOC connection problem
> >
> > Hi Oksana,
> >
> >
> > Just to be clear, did you add HTTP to the drvAsynIPPortConfigure
> > command, and remove the "disconnect" commands from the protocol file?
> >
> >
> > Mark
> >
> >
> >
> > ________________________________
> > From: Ivashkevych, Oksana <oksana at bnl.gov>
> > Sent: Wednesday, December 9, 2020 2:35 PM
> > To: Mark Rivers
> > Cc: tech-talk at aps.anl.gov
> > Subject: RE: serial IOC connection problem
> >
> > Hi Mark,
> > Thank you very much!
> > Not a single squeak!
> >
> > I may suggest considering adding "164.54.17.43:5186 HTTP" to the list
> > of examples in the link you shared.
> >
> > Thanks again,
> > Oksana
> >
> > > -----Original Message-----
> > > From: Mark Rivers <rivers at cars.uchicago.edu>
> > > Sent: Wednesday, December 09, 2020 2:15 PM
> > > To: Ivashkevych, Oksana <oksana at bnl.gov>
> > > Cc: tech-talk at aps.anl.gov
> > > Subject: Re: serial IOC connection problem
> > >
> > > Hi Oksana,
> > >
> > >
> > > It may be that this device wants to just do a single transaction per
> > > connection.  That is how Web servers work.
> > >
> > >
> > > drvAsynIPPort supports that mode of operation directly.
> > > https://urldefense.com/v3/__https://epics-
> > > modules.github.io/master/asyn/R4-
> > >
> >
> 41/asynDriver.html*drvAsynIPPort__;Iw!!P4SdNyxKAPE!Sz1Tm08wfhCbs3_
> > > mnZgFXMFrf7-JRdetWpdz-RbQ7TG0ozHVy-fgl3g3QhaCrw$
> > >
> > >
> > > You need to change this line:
> > >
> > >
> > > drvAsynIPPortConfigure("FTS", "10.16.2.195:49151")
> > >
> > >
> > > to this:
> > >
> > >
> > > drvAsynIPPortConfigure("FTS", "10.16.2.195:49151 HTTP")
> > >
> > >
> > > Once you do that I think you can remove the "disconnect" commands
> > > from the protocol file.
> > >
> > >
> > > If you still have trouble please turn on ASYN_TRACEIO_DRIVER for the
> > > IP port and send the output.
> > >
> > >
> > > Mark
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of
> > > Ivashkevych, Oksana via Tech-talk <tech-talk at aps.anl.gov>
> > > Sent: Wednesday, December 9, 2020 12:51 PM
> > > To: tech-talk at aps.anl.gov
> > > Subject: serial IOC connection problem
> > >
> > >
> > > Hello,
> > >
> > > I have been asked to port an existing Serial IOC  for a Force Torque
> > > Sensor from ATI from one server (Debian 7 with Debian packages dated
> > > ~ at least 5 years ago) to CentOS 7.
> > >
> > >
> > >
> > > CentOS 7.7.1908; base R7.0.3.1; asyn R4-37; SerialDevice master.
> > >
> > >
> > >
> > > After the ported recompiled IOC reported unrecoverable connection
> > > error, I have created a brand new IOC using the latest
> > > makeBaseApp.pl
> > script.
> > >
> > >
> > >
> > > Errors became more dynamic, and I do see some readings, when IOC
> > > does manage to connect successfully. I have browsed the Tech Talk
> > > and found a related discussions about connecting/disconnecting.
> > > Protocol file of this IOC does  connects/disconnects after every
> > > read and is very simple. I only can guess why the developer made
> > > this decision, I am sure it was an unavoidable compromise.  I did
> > > add asynSetTraceMask call which changes temporarily the dynamic of
> > > the errors.  Logs and proto
> > are attached.
> > >
> > >
> > >
> > > In summary: I have two iocs accessing same device: the old one
> > > running on Debian 7, and the new on running CentOS 7. The old one
> > > works without problem the new on reports connection errors and does
> > > manage to read something at the frequency ~30 times slower than 0.1
> > > expected scan. I am out of my own ideas, and would appreciate help
> > > from the
> > community.
> > >
> > >
> > >
> > > Thank you,
> > >
> > > Oksana
> > >


Replies:
RE: serial IOC connection problem Ivashkevych, Oksana via Tech-talk
References:
serial IOC connection problem Ivashkevych, Oksana via Tech-talk
Re: serial IOC connection problem Mark Rivers via Tech-talk
RE: serial IOC connection problem Ivashkevych, Oksana via Tech-talk
Re: serial IOC connection problem Mark Rivers via Tech-talk
RE: serial IOC connection problem Ivashkevych, Oksana via Tech-talk
Re: serial IOC connection problem Mark Rivers via Tech-talk
RE: serial IOC connection problem Ivashkevych, Oksana via Tech-talk

Navigate by Date:
Prev: RE: Faster Scan Rates possible? Manoussakis, Adamandios via Tech-talk
Next: RE: serial IOC connection problem Ivashkevych, Oksana 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: RE: serial IOC connection problem Ivashkevych, Oksana via Tech-talk
Next: RE: serial IOC connection problem Ivashkevych, Oksana 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  <20202021  2022  2023  2024 
ANJ, 09 Dec 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·