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 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
<== Date ==> <== Thread ==>

Subject: Re: Default value to field SCAN
From: Gabriel de Souza Fedel <gabriel.fedel@lnls.br>
To: <tech-talk@aps.anl.gov>
Date: Tue, 3 Jan 2017 16:58:41 -0200
Hello Andrew, thank you for the answers,

Em 03-01-2017 16:23, Andrew Johnson escreveu:
On 01/03/2017 05:57 AM, Gabriel de Souza Fedel wrote:
When I create records and don't set the field SCAN, what is the default
value? There is an way to change this?

For DBF_MENU field types the default value is usually the first of the
choice() entries declared in the relevant menu definition loaded by the
IOC. An individual record-type's .dbd file can override that standard
default value for fields that it defines, but not for fields declared in
the dbCommon.dbd file.

The SCAN field is declared in the dbCommon.dbd file, and the relevant
menu is menuScan, the first choice of which is Passive, so that will be
the value of any SCAN field which is not explicitly set during the
record loading or IOC startup process (remember that tools such as
autosave can modify record field values during the iocInit process).

You can build an IOC using a locally modified version of the
menuScan.dbd file (thus you can have different scan rates for each IOC
if you wish to) but you must leave the first three entries (Passive,
Event and I/O Intr) exactly as they are defined in Base, and you must
have at least one periodic scan rate defined. Recent versions of Base
will give a warning during iocInit if any of these conditions are not
met by the menu(menuScan) definition.
Great, my answer was for this case (how default values work for SCAN).


I'm having problems with a set of records without SCAN field that are
consuming a lot of CPU, and receiving this messages:

dbScan warning from '.2 second' scan thread:
        Scan processing averages 0,00 seconds (0,00 .. 0,02).
        Over-runs have now happened 283681 times in a row.
        To fix this, move some records to a slower scan rate.

dbScan warning from '.5 second' scan thread:
        Scan processing averages 0,00 seconds (0,00 .. 0,03).
        Over-runs have now happened 290049 times in a row.
        To fix this, move some records to a slower scan rate.

dbScan warning from '.1 second' scan thread:
        Scan processing averages 0,00 seconds (0,00 .. 0,03).
        Over-runs have now happened 278431 times in a row.
        To fix this, move some records to a slower scan rate.

If i remove small choices from dbd file (.1, .2 and .5 seconds) solves
the problem. Apparently the records are being created with all SCAN
values...some idea to solve this?

These symptoms are very strange; as Mark Rivers suggested those average
processing times should be larger than the nominal scan period. Please
cd to your base/src/libCom/test directory and type 'make runtests' and
report any test failures here. Also please try running the IOC with the
LANG environment variable set to "C" instead of whatever it is currently
set to in case that is causing the problem.
First, setting LANG=C stop this messages....why?

Secondly, I ran the tests, and some errors happened (attached), but doesn't look to be anything related to that messages.


Regards,

Gabriel


- Andrew


--
Gabriel Fedel
Software de Operação das Linhas de Luz
Laboratório Nacional de Luz Síncrotron – (LNLS)
Centro Nacional de Pesquisa em Energia e Materiais (CNPEM)
gabriel.fedel@lnls.br | +55 (19) 3512 1226
www.lnls.cnpem.br
make -C O.linux-x86 -f ../Makefile TOP=../../../.. \
	    T_A=linux-x86 runtests
make[1]: Entrando no diretório `/usr/local/epics/base-3.14.12.5/src/libCom/test/O.linux-x86'
perl -MTest::Harness -e 'runtests @ARGV if @ARGV;' epicsUnitTestTest.t epicsCalcTest.t epicsAlgorithmTest.t epicsMathTest.t epicsEllTest.t epicsEnvTest.t epicsErrlogTest.t epicsStdioTest.t epicsSockResolveTest.t epicsStringTest.t epicsTimeTest.t epicsThreadTest.t epicsThreadOnceTest.t epicsThreadPriorityTest.t epicsThreadPrivateTest.t epicsExitTest.t epicsTimerTest.t ringPointerTest.t ringBytesTest.t epicsEventTest.t epicsMutexTest.t epicsExceptionTest.t macEnvExpandTest.t macLibTest.t taskwdTest.t blockingSockTest.t epicsMessageQueueTest.t
epicsUnitTestTest.t ........ ok
epicsCalcTest.t ............ ok
epicsAlgorithmTest.t ....... ok
epicsMathTest.t ............ ok
epicsEllTest.t ............. ok
epicsEnvTest.t ............. ok
epicsErrlogTest.t .......... ok
epicsStdioTest.t ........... 
Failed 1/163 subtests 
	(less 11 skipped subtests: 151 okay)
epicsSockResolveTest.t ..... ok
epicsStringTest.t .......... ok
epicsTimeTest.t ............ ok
epicsThreadTest.t .......... ok
epicsThreadOnceTest.t ...... ok
epicsThreadPriorityTest.t .. ok
epicsThreadPrivateTest.t ... ok
epicsExitTest.t ............ ok
epicsTimerTest.t ........... ok
ringPointerTest.t .......... ok
ringBytesTest.t ............ ok
epicsEventTest.t ........... ok
epicsMutexTest.t ........... ok
epicsExceptionTest.t ....... ok
macEnvExpandTest.t ......... ok
macLibTest.t ............... ok
taskwdTest.t ............... ok
blockingSockTest.t ......... ok
epicsMessageQueueTest.t .... ok

Test Summary Report
-------------------
epicsStdioTest.t         (Wstat: 0 Tests: 163 Failed: 1)
  Failed test:  152
Files=27, Tests=2083, 164 wallclock secs ( 0.37 usr  0.21 sys +  1.04 cusr  2.09 csys =  3.71 CPU)
Result: FAIL
make[1]: Saindo do diretório `/usr/local/epics/base-3.14.12.5/src/libCom/test/O.linux-x86'

Replies:
Re: Default value to field SCAN Andrew Johnson
References:
Default value to field SCAN Gabriel de Souza Fedel
Re: Default value to field SCAN Andrew Johnson

Navigate by Date:
Prev: Re: Default value to field SCAN Andrew Johnson
Next: Re: Default value to field SCAN Andrew Johnson
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
Navigate by Thread:
Prev: Re: Default value to field SCAN Andrew Johnson
Next: Re: Default value to field SCAN Andrew Johnson
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
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·