EPICS Release 3.13.8

Changes since 3.13.7

dbEvent Bug Fix Changes


The bug exists in EPICS 3.13.5, 3.13.6, 3.13.7


An IOC core CA server thread is found to be using excessive CPU possibly at elevated priority resulting from vxWorks priority inheritance scheduling. All attached CA clients will permanently disconnect from the IOC, and record processing may be disrupted if the threads priority is elevated. Elevated priority was observed in the one situation where the bug has been reproduced and identified so far.

Circumstances Related to Relative Rates of Occurrence

This bug will occur only in circumstances where the CA client deletes a monitor subscription and the client's CA event queue in iocCore is 100% full. Since there is always space for each monitor subscription to place at least one update on the queue then the queue can only be full if *all* subscriptions for a particular client are sending subscription update events at a rate that is faster than the client is reading them. Therefore, specialized clients that have a small number of regularly updated subscriptions and that do not regularly call ca_poll() or ca_pend_event() are more likely to reproduce the problem.

Config Changes

Changes since 3.13.6

IOC resident CA server


UDF how has a promptgroup. This allows database configuration tools to mset UDF false.


Field VAL now has a cvt_dbaddr method. If any state strings are defined the field type and dbr_field_type are declared ENUM. If no state strings are defined then the type is USHORT. Previously the types were always ENUM.


ai and ao now support special_linconv. NOTE: NOT TESTED.


Add some cacheFlush statements

aiRecord and aoRecord: Setting eoff=egul

Instead of init_record executing code like

    if ((pai->linr == menuConvertLINEAR) && pdset->special_linconv) {
        pai->eoff = pai->egul;

It now executes:

    if ((pai->eslo==1.0) && (pai->eoff==0.0)) {
        pai->eoff = pai->egul;

aoRecord has a similar change

This was done so that old device support which does not implement special_linconv still works.

CA puts to disabled record

If a CA client issues a put to a disabled record then, when the record is enabled, database puts to the record will not make the record process until a CA put is again issued. This is fixed

dbb - database breakpoints

The database breakpoint facility was not working. This has probably been true for several releases. It is now fixed.

TPRO - trace processing

If dbProcess is called recursively by different tasks, it did not properly handle TPRO. Consider the following database:

record(ao,"mrkao") {
    field(OUT,"mrkai CA")
record(ai,"mrkai") {

If a channel access put is sent to mrkao, no message is issued when mrkai is processed.

This is now fixed.


If in your st.cmd file you issue the command.


And set the TSE field of any record to a non zero value, then a crash will occur when recGblGetTimeStamp is called.

This is now fixed.


nsev not sevr must be checked to decide if dbPutLink should be called.

This is now fixed


This now returns a non zero value if the result is nan (not a number).


Improved diagnostic message.

CA server (rsrv)

Fixed race condition occuring when a put notify is canceled by a ca_clear_channel at the same instant that it completes. This problem was introduced in R3.13.5.

Changes since 3.13.5


If a request was made to restart a putNotify but another putNotify started before it, then it was put on the restartList twice. This resulted in the cbLow task getting into an infinite loop.

dbConvert and dbFastLinkConv

When a double precision 0 is converted to a float, instead of 0 the float value becomes -FLT_MIN, which is a very small ,value, e.g. -1.175494e-38.

iocInit and initHooks

initialProcess is now called before interruptAccept. This means that initial processing will be done before periodically scanned and I/O Inter scanned record s start processing. This also changed the order of two of the steps in initHooks.h


A check is made that Irqvector is a multiple of 4.


dbCaGetLink must return -1 when settinf sevr to INVALID or a FPE may be rasied on a powerPC.


The call to cfsa was passing val as an argument. It is changed to rval. See tech-talk message from Noboru Yamamoto Nov 2001.


All existing manipulations of UDF in process() are removed and one udf is set FALSE when the raw value is successfully read.


In do_sel udf is not set false at the beginning. If selm has an invalid value recGblSetSevr(psel,SOFT_ALARM,MAJOR_ALARM) is called.


Changes were made so that this works on the powerPC. Improved IACK code.

CA Client Library

IOC Resident CA Server

Changes since 3.13.4

convertRelease and checkRelease

New applications created with makeBaseApp.pl now have the functionality of the makeConfigAppInclude.pl and makeIocCdCommands.pl scripts combined into a single convertRelease.pl script.

The new script also provides consistency checking of the entries in the config/RELEASE file, so that gnumake will stop with an error report if a definition in any other <supporttop&gt/config/RELEASE file is different to the same definition in this application. This checking can be disabled by editing config/Makefile.Host.

Applications created using earlier versions of EPICS will continue to work as before and will not benefit from the consistency check functionality.

devAiSoftRaw and devAoSoftRaw

ai and ao records using DTYP="Raw Soft Channel" can have their EOFF and ESLO fields set manually at design or run-time, and these values will be used when LINR=LINEAR. The same applies to any device support that doesn't provide a special_linconv() routine; if special_linconv() is provided however, the original behaviour occurs (EOFF is set to EGUL and ESLO is calculated by that routine). The ESLO and EOFF fields now have CA monitors posted if their value is changed by the special_linconv() routine.


Increased stack size from 4096 to 819l.


Now uses osiSock for to handle implementation diffences

Constant Links

Hex and octal constants are now accepted for constant links. recGblInitConstantLink uses %i instead of %u for unsigned types. This is so that hex constants are accepted. %u does not accept hex. dbPutString makes a link constant if either strtod or strtol eats entire string. Previously only strtod was used.

Breakpoint tables

A bug that caused an invalid conversion when the raw value is greater than the maximum table value is fixed. If the raw value is outside the table, the aiRecord and aoRecord now specify a severity of MAJOR_ALARM instead of INVALID_ALARM.

VAL field a promptgroup

The VAL field of the following recordtypes can now be given values by database configuration tools: aiRecord, aoRecord, biRecord, boRecord, calcoutRecord, longinRecord, longoutRecord, mbbiDirectRecord, mbbiRecord, mbboDirectRecord, mbboRecord.

Several of the changes have been made to help prevent exceptions on powerPcs when conversions are made from float to double.

CA Server Bug


Clients disconnect unexpectedly when canceling event (monitor) subscriptions using ca_clear_event(), but this may not be noticed because the problem is probably rare under low or moderate load, and because CA clients automatically reconnect. The problem was only reproducible here under heavy load presented when the R3.14 client side regression tests were run on a fast Linux workstation. For example, when the tests were run on a 500 MHz NT host I was unable to reproduce the bug. On vxWorks you may see threads with the name "CA client" and also "CA event" even if there are no clients connected (the casr diagnostic will also incorrectly report that clients are connected). As the IOC stays in long term operation without a reboot, and depending on the frequency of occurrence at your site (if any), you may also notice that memory and file descriptors have been lost.


The problem was discovered when regression testing EPICS R3.14. The cause was a deadlock occurring when a CA event (monitor) subscription was canceled when the CA circuit was simultaneously in event (monitor) flow control mode and the event (monitor) subscription also had a corresponding update in the queue.

PPC float to double exceptions

Several of the changes have been made to help prevent exceptions on powerPcs when conversions are made from float to double.

aaiRecord aaoRecord aiRecord aoRecord boRecord calcRecord calcoutRecord compressRecord dfanoutRecord egeventRecord selRecord subArrayRecord subRecordwaveformRecord

All DBF_FLOAT fields have been replaced by DBF_DOUBLE

dbConvert dbFastLinkConv db_access

Conversion from double to float checks for exponent too large.

dfanoutRecord.c longoutRecord.c stringoutRecord.c

OMSL did not work correctly for constant links.


Database Channel Access Links

A message was sent to errlog whenever the connection to the server was lost. This message is no longer generated.


National Instruments MXI-2 devices are now fully supported on both 68K and PowerPC (the PowerPC BSP must provide code for the vxWorks intVecGet() routine though). PowerPC CPUs that have a Universe VME interface chip will have problems driving MXI-1 boards, although they can be made to do so by setting the variable 'vxi_use_failed_mxi' to a non-zero value in the st.cmd file before iocInit() and ignoring any warnings about the MXI-1 board having failed its self-test.

If a VME-MXI-2 board will not be installed as the VME system controller read the NOTES: towards the top of the driver source for an essential warning.

There is special code for the National Instruments CPU030 board in this file, which is now only included when compiling for that particular CPU board (an entry in config/CONFIG.Vx.niCpu030 enables this).

Put Notify

A bug in dbNotifyCancel could cause a problem if a channel access client disconnects while put notifys are outstanding.


A bug was fixed that was related to dynamically changing lock sets.

The record support put_array_info is called after the a put only if the put is successful. Previosuly it was always called.

breakpoint tables

Breakpoint values are doubles rather than floats.


Improved algorithm for cpuUsage

Changes since 3.13.3

Channel Access

Symptom: CA clients on all versions of EPICS with unresolved  channels broadcast search messages too frequently if an EPICS R3.13.3 server is present. This bug does not occur if an R3.13.3 server is not present.

Changed: CA server now sends beacon messages which uniquely  identify the server address. The CA repeater was also upgraded to detect, and fix, any problems of this nature.

Symptom: Undefined symbols show up when EPICS R3.13.3 was loaded  into a PC IOC running Tornado II.

Changed: Conditionally compiled out references to architecture inappropriate system calls.


longinRecord and longoutRecord

These did not properly set monitors when delta=0x80000000. This happened when the record was attached to a 32 bit digital device .

Access Security TrapWrite feature

Access security now provides the ability to trap write requests coming from a client. RULEs in the access configuration files accept an option argument NOTRAPWRITE or TRAPWRITE. For example:

If the additional argument is not specified the default is NOTRAPWRITE.

The purpose of this new facility is to allow things like logging Channel Access writes. Epics base itself does not provide this ability but only the hook needed by such a facility. DESY has developed a facility that logs CA puts. The trap writes feacure allows the DESY facility to be implemented without any changes to epics base. In addition it allows the user to decide what should be logged.

This new facility will be described in more detail in the 3.14 version of the Application Developer's Guide.


When obtaining graphic, control, and alarm limits, the destination values were not initialized. If record support did not set values then the unitialized values were returned. This caused exceptions to occut on powerPCs. The values are now initialized to 0.


Changes since 3.13.2

Build Changes

Channel Access Changes

Fixed the RISC architecture specific problem in iocCore which results in an intermittent and infrequent assert failure with this message: "assert (ev_que->evUser->nDuplicates>=1u)". This was actually fixed in release 3.13.2.

All structure members with names "m_type" were changed to "m_dataType" to avoid a macro name compile time conflict present in the SENS IP kernel supplied with Tornado II and optionally in Tornado I.

The network interface query code used by Channel Access to auto-configure its address list was modified to be compatible with changed API's present in the SENS IP  kernel supplied with Tornado II and optionally inTornado I.


This now works for ca_put_callback as well as ca_put.

Spaces in task names

Task names no longer have any blanks


Made tsStampFromLocal and tsStampToLocal public rather than private.


The following new routines have been added.



is changed to



a monitor for the STAT field is fired if either the STAT or SEVR changes. Previously a monotor was fired only if the STAT changes.


In dbPutLinkValue, if the (out)link has MS property, the old severity was propagated instead of the actual one. This is fixed by calling recGblSetSevr with NSEV instead of SEVR of the source record.



The stack size for cpuUsageTask was increased. The precious stack size was too small for mv172s, which do not have a separate interrupt stack like the mv167.  The same problem may exist on other processors such as the powerPC.


It was incorrectly reporting VALUE,  ALARM and LOG for all events.


Added fields drvl and drvh

aiRecord, calcRecord, calcoutRecord, selRecord, and subRecord

In alarm the definitions of hihi, high, low, lolo; are changed from float to double.



A dbPutLink is attempted for all links even if a put for a previous link fails. If a dbPutLink fails  recGblSetSevr(pdfanout,LINK_ALARM,MAJOR_ALARM) is called.


When dbPutString  writes to the VAL field then udf is set false.


cvtLongToHexString now puts 0x in frount of the number and cvtLongToOctalString writes a leading 0.

Changes since 3.13.1


There was a bug when converting ascii string format to time stamp. The bug involved the year 00 appeared in the ascii string

Channel Access

1) A severe problem where the CA client did not exit a loop sending UDP to a list of addresses if an error condition was returned from the system call which sends a UDP frame was fixed. This problem was discovered during load testing, and will be more likely to occur under heavy network loading conditions.

2) A problem where the client library could fail and use a deallocated data structure if a connection dropped while it was waiting to send a message to a client was fixed.

3) The CA client now maintains a congestion avoidance threshold on UDP search transmissions similar to the congestion avoidance algorithm employed by modern version of TCP. There are also some small changes related to how the search counters are maintained without allowing them to overflow. This patch was made in R3.13.1 because I originally identified it as the fix for (1) above, but it turned out to not be the root cause.

4) A bug fix was made for a problem where the CA repeater was inheriting on HP-UX, and possibly other UNIX systems that are not Solaris, certain open file descriptors when fork()/exec() are used to start the CA repeater.

5) Changes that allow CA to work on Microsoft Visual C++ 6.0 (which includes a new win sock DLL and some changes in esoteric parts of the socket API).

6) always inform client of "no write access" for a SPC_NOMOD fields.

7) calls to ca_printf removed from rsrv.

8) prevent UDP daemon from running damaged messages with TCP protocol and visa-versa

9) use ipAddrToA() so that address print out does not come out byte swapped on the PC

10) improved debug messages and added diagnostics

11) don't send an exception to client when bad request received over UDP.



access security

A ca exception handler was added. Thus exceptions will no longer cause the asCa task to suspend.


A ca exception handler. Thus exceptions no longer cause dbCa task to suspend.


pevent_scan_list->scan_list.lock was not initialized. Amazingly it did not cause a crash. Note that the lock is only used when the scan mechanism of records are dynamically changed.



breakpoint tables

Tables names were previously forced to be alphanumeric. This restriction is removed.



removed definition for  reboot.


If  dbPutNotify called dbProcess and dbProcess returned an error the notify completion callback was called twice. This bug is fixed.


This support was defining storage twice. A bug in the current gcc compiler supplied with tornado does not properl;y compile such code. The extra definitions are removed.


aoRecord calcRecord  calcoutRecord selRecord subRecord

hyst and lalm changed from float to double


hyst, lalm, hihi, high, low, lolo all changed from float to double


compressALG_N_to_1_Median (compress keeping median value) added.


When just the record's severity changed, only monitors on the VAL fields were posted, no monitors on the single bit fields.


ErGetTicks now locks while updating ticks



all mallocs changed to callocs. This is needed for the new unbundled bitbus support.

bitbus support

This support is now unbundled. DO NOT use the version in base. This includes the following

NOTE: drvBitBus.h, drvBitBus.c, drvBitBusInterface.h, and drvBitBusErr.h appear in both base and unbundled because drvGib uses it.  Must be fixed when gpib is unbundled.

drvBBMsg.c drvBBMsg.c drvRs232.c drvTy232.h

Removedfrom base. Seemed to be old duplicate version of drvBB232.c or not used at all.


removed, was replaced by the digitel record type & device support


This support has been available for some time as an unbundled product. It is not longer included with base.

Allen Bradley

The allen bradley support has been available for some time as an unbundled product. It is not longer included with base.

devOpt support

The following gpib support modules have been changed to fix compiler bug for vxWorks 5.3:

mkdir.pl and rm.pl

 getopt() changed to  getopt "";


Moved  export statements to the right place.

access security

Issue better error message if access security initialization fails.



Under certain conditions (an input link referencing a PV on another ioc and an unusually long ioc initialization), the calcout record would cause an  error during iocInit by attempting to dbScanLock a record prematurely. This anomaly has been resolved with this version. No changes to the functionality of the calcout record were made.


Allow pattern with no substitutions.


This had an error that prevented it from compiling

Changes between beta12 and 3.13.1


If either of the environment variables EPICS_IOC_LOG_PORT or EPICS_IOC_LOG_INET are not defined then iocLogDisable is set true, i.e. logging is disabled. Also in the epics base distribution EPICS_IOC_LOG_FILE_NAME and EPICS_IOC_LOG_INET are set to null.


This is a new routine for database channel access links.


The routine TSsetClockFromUnix was made global. Calling it forces a resynchronization with a host time server. This is useful to
force a master timing ioc to resynchronize.

Several bugs were fixed. Previously async clients did not sync properly with a master timing ioc. Also if an async client syncing with a unix/ntp server got out of sync by > 1 sec then it could get out of sync by 1 to 20 seconds for an indeterminate period of time.


Task priorities were changed so that no epics task  has higher priority than netTask. Definitions for IOEVENTSCAN and TIMESTAMP were removed.

histogram record

Added new field PREC for display of double and float fields ULIM, LLIM, SDEL, SVAL, SGNL, and WDTH. Added unsigned long fields HOPR and LOPR for display of VAL array counts.  Changed SDEL field from SPC_NOMOD to SPC_RESET to allow start and stop of the watch dog timer.


The lex definitions have been changed so that definitions like

#define ERRVALUE  9.90E+09

are accepted.

Initial values for static variables are now honored. Previously the syntax was permitted but the initial value was ignored. Note that initial values will give a compilation error if the "recursive" option is used because the assignments are within the body of a struct {} definition; it seemed worthwhile supporting the syntax for the non-recursive case.

devMbbiDirectSoftRaw, devMbbiSoftRaw, devMbboDirectSoftRaw, devMbboSoftRaw

SHFT was made a prompt field and also modifiable.  The VAL field of mbboDirectRecord is now modifiable.

If the fields NOBT and SHFT are given values then this device support will honor the MASK and SHFT fields just like hardware device support. To keep compatibilty with old databases, if NOBT is 0 during init_record, mask is set to the value 0xffffffff. Thus old databases will act like previously unless the nobt field was set to a non-zero value.


No longer calls dbScanLock until interruptAccept is true.

breakpoint tables

Entering negative values failed. This bug is fixed.

dbl("<record type>","<output file>","<field list>")

The vxWorks console command dbl now allows an additional argument, which is a list of field names.

For example

iocexample> dbl "ai",0,"DESC SCAN"
mrk:aiExample,"Analog input","Passive"
mrk:aiExample1,"Analog input No. 1","Passive"
mrk:aiExample2,"Analog input No. 2","Passive"
mrk:aiExample3,"Analog input No. 3","Passive"

June 15, 1998

All major functionality that will be in R3.13 is now in place. It has been build on solaris, sunos, HPUX, alpha, SG, and winXX. This release is still called a beta release but will become 3.13.1 as soon as it has been used on a few production systems (bug fixes will be made if necessary)

The Application Developer's Guide is a major revision of the 3.12 edition. The latest version is for beta12 base release.  It is available in pdf (adobe acrobat reader) and in postscript. The pdf format is nice for online viewing and postscript for generating a hard copy.

LANL has a revision of the Record Reference Manual available. See the LANL EPICS documentation.

The document "EPICS IOC Applications: Building and Source/Release Control" provides guidlines for developing applications with 3.13.

Changes between beta11 and beta12

IOC Applications: Building

The following explains changes that need to be made to existing applications that followed the EPICS IOC Applications: Building and Source/Release Control. guidelines. See the new version of this manual for details.

Before switching applications to beta12 it is STRONGLY recommended that you execute:

cd <top>
gnumake clean uninstall

Changes to <top>/config:

Remove the following lines:
ifndef T_A
endif #ifndef T_A
If desired add a definition for TEMPLATE_TOP
These no longer exists in base.  Replace your version with the version from:
Remove the rules for creating soft  links.
makeDbDepends.pl, makeIocCdCommands.pl, replaceVAR.pl
Copy the versions from  <base>/templates/makeBaseApp/top/config
Remove this file

Changes to xxxApp/src

Move the following definitions from Makefile.Vx to Makefile.Host:

Changes to xxxApp/Db

Rules for DBFROMTEMPLATE and INDDBFROMTEMPLATE no longer exist. See the new documentation of makeBaseApp for details of what the make rules are for databases.

Changes to iocBoot and iocBoot/iocxxx

iocBoot no longer needs a generated nfs.cmd file

iocBoot/iocxxx no longer contains soft links. Instead the following is done:


This did not work properly if DOL  is a channel access link that fails.


Most locking semaphores have been changed from semBCreate to semMCreate with the options :

A performance test showed that executing

in a 25MHZ mv167 took  (4.4 ,7.8) microseonds when (semBCreate,semMCreate) was used. The extra options as well as allowing a task to lock recursively are worth the difference in performance.

Task Priorities

The priority of the channel access client for database links was changed from 100 to 68, which makes it lower than all scan tasks but higher than the sequencer or any channel access tasks.


This was changed to print numbers with precision<=8 and magnitude <1e16 in fixed format with up to 3 digits after the decimal point. As an example if PREC=1 and a number is 363000000.1 previously it was convetred to


Now it is converted to


All you RF folks can cheer.

Access Security

Previously it was possible to crash an IOC if access security was restarted after iocInit. This is now fixed. Two major changes were made.
  1. asCaTask is no longer deleted and restarted. Instead it just clears all channels and than adds the new channels
  2. The locking mechanism was changed and made more roibust and easier to understand.
  3. Fixed bug that caused asRegisterClientCallback to fail on UNIX.
  4. asLib_lex.l changed to allow more characters(like dbLoadxxx)
  5. Fixed bug that could cause deadlock when an ASG field is changed at run time.
Access Security now supports macro substitutions. A new vxWorks shell command is:
  See the Application developer's Guide for details about access security.

tsdefs.h and tsSubr.c

tsTextToStamp and tsTimeTextToStamp no longer modify the pointer or the string referenced by pText.

The nextField routines used by tsSubr were moved inside tsSubr.c  and made static routines.


Checked for Y2K complience. It turns out it was even ok when NTP time overflows in 2036. However it was modified so that no overflows should occur while converting between NTP, UNIX, and EPICS epochs. In addition the conversion of fractions of a second to nanaoseconds was changed and formatting was changed so that interesting code does not run off right side of page. Hopefully EPICS base is now fine for Y2K. In fact it should be fine (as far as time is converned) until the Unix epoch overflows a 32 unsigned integer in the year 2106.


Removed from base.


Base now builds with either vxWorks 5.2 or vxWorks 5.3. The default is to build vxWorks 5.3. In CONFIG_COMMON a new definition "VX_IS_TORNADO = 1" is present. If this statemant is commented out then vxWorks 5.2 is assumed.


Only the perl version is now supported. Due to encouragement from Rozelle Wright (LANL) and the developers at BESSY, makeBaseApp now uses template files instead of being one huge ugly perl script.  Ralph Lange (BESSY) made major changes to makeBaseApp. It supports two sets of templates provided with base (simple and example) as well as templates stored elsewhere. Thus each site can add new sets of template files.

See the new WWW documentation on Application Source Release for details


The include path now supports the unix convention that an empty directory name means the current directory. Thus the following are OK
-I nnn::mmm    # Current directory is between nnn and mmm
-I :nnn        # Current directory is first
-I nnn:        # Current directory is last
The lex grammer was changed so that quoted strings can contain any ascii character except a quote. A quote itself can be given as the escape sequence \". This same change was made to dbLoadRecords and dbLoadTemplates.

For all fields in a .db file, a non null string is considered as not the default.

For winNT the path seperator is a ;

Field attributes (psuedo fields) are now supported. In particular RTYP (record type) and VERS (version) are now supported. In addition a new request type DBR_CLASS is supported. See Application Developer's guide for details.

Runtime database access




Changed to support initHookRegister. See Application Developer's Guide for details. The 3.13.0beta11 version explains the new method. Note that to use the new the startup file must contain the statement:
ld < bin/initHooks.o
If you have your own version of initHooks.c it should be changed to support the new features. At a minumum the statement
void initHooks( int state)
must be changed to
    void initHooks( initHookState state)


The no alarm string changed from "" to "NO_ALARM"

Linear Conversion for ai and ao records:

Before beginning it should be stated that the previous linear conversion method is still valid.

The following, which is designed by Benjamin Franksen at BESSY, is now the recommended method:

A new field EOFF exists.  The new linear conversion algorithm is now

AVAL is the raw value adjusted by ASLO and AOFF.

Thus device support should now compute ESLO and EOFF instead of ESLO and ROFF.

For example let an ADC be a 16 bits adc with raw values between -32767 and 32767.

ESLO = (EGUH - EGUL)/65535.0;
EOFF = 0.0;
The original  bi-polar adc device support modules added a "bias" to the raw value so that the raw value is >= 0. When they were written neither RVAL or EOFF existed.

RISC architectures

Some changes were made to build on RISC architectures. A new include and source file (adjustment.h and adjustment.c) were created to aid this support. We can thank Peregrine McGehee for this new support.


This is a replacement for the old code that implemented errMessage, errPrintf, and epicsPrintf. It provides for multiple system wide error loggers. The existing iocLog has been modified to use the new code. The new code supports the old calls and adds some new calls. See Application Developer's guide  for details.


Changed Scl to Slc wherever this occured. Added support for signed 16 bit analog values. Stephanie Allison (SLAC) made these changes.


Removed from base.


Major rewrite of this routine. It computes the cpu usage via a low priority taks rather than using spy. It reports file descriptor usage rather than tcp connections (this is what is actually measures). The format of the INP ,and OUT fields has changed since the previous version.  The new device definitions are:
device(ai,INST_IO,devAiVXStats,"VX stats")
device(ao,INST_IO,devAoVXStats,"VX stats")
The INP fields now have the form
The OUT fields now have the form
The source file has comments showing a sample database.


This has been drastically changed. Look at <base>/src/dev/symbDev/README for details.

CA Client Library

Problems where 3.13.beta11 clients were unable to connect to 3.11 and receive the correct native type have been fixed. The CPU is now consumed more efficently by CA tasks waiting in select() under vxWorks. The client lib now detects an IOC reboot when that reboot is faster that EPICS_CA_CONN_TMO. CA now runs better on systems without local interface query capabilities (currently only cygwin32).

C++ Channel Access Server - CAS

The constructor for class casPV no longer requires a reference to the server. For backward compatibility a reference to the server may still be supplied, but it will not be used. The C++ Portable Channel Access Server Library now builds on VMS. A really bad bug was fixed in the example directory server when clients use PV names with ".xxxx" (a field name) in them.

Global Data Descriptor Class - GDD (only used by the C++ CA server)

A bug occurring when the primitive type was changed to/from aitSting and the constructor/destructor member functions for class aitString were not run has been fixed. A bug occurring when class GDD changed the bounds on the destination GDD has been fixed. A smart pointer class for GDD was added. This class automatically maintains the GDD's reference count so that the GDD will not be deleted until the last smart pointer class pointing to it is deleted. Moving this responsibility to a class will greatly reduce the probability of making a mistake in application code.

WIN32 (PC) Port of EPICS

Winsock II is now required. This allows CA to properly execute EPICS_CA_ADDR_LIST=YES. Windows NT 4.0 comes with Winsock II. A properly functioning Winsock II for Windows 95 can be obtained form http://www.microsoft.com/windows95/info/ws2.htm. Beware of buggy versions of Win95 Winsock II that are sometimes installed by 3rd party products. A static (no EPICS DLLs) build of EPICS on WIN32 is now supported. The EPICS CA repeater is now automatically started under WIN32 if it isnt running. At Ken Evans' request GUI programs will this release _not_ allocate a console for messages from EPICS libraries unless base is compiled with host optimisation turned off (HOST_OPT=NO). If you would like to see messages from EPICS base libraries when using an optimised build, then start GUI programs from a DOS window.

EPICS Environment Variables that Include Host IP Addresses

It is now possible to use DNS host names in addition to dotted IP addresses in EPICS environment variables. All operating systems that have a DNS client implementation should allow this. Currently only vxWorks does not, and so if you would like to use real host names instead of dotted IP addresses on vxWorks you must use the "hostAdd()" function to add host name / IP address pairs from your system start-up script. For Example: hostAdd ("mercury_dirigible","") putenv ("EPICS_IOC_LOG_INET=mercury_dirigible")

GCC 2.8

The host portions of EPICS now build correctly with GCC 2.8

Changes between beta4 and beta11

Support for win95 and winNT

Epics base now builds on windows platforms

GDD and Portable Channel Access Server

The gdd library and the portable channel access server now build on all platforms, except SGI and cygwin32, listed above. This also means that C++ is supported on these platforms.

Application Developer's Guide

The chapter "Building IOC Applications" is gone. It is replaced by the document "EPICS IOC Applications, Building and Source/Release Control". Other changes are minor. Following is a brief list: NOTE:The initHooks described in the appDevGuide is not in beta11. In beta11 initHooks is the same as previous releases. The new version will be in the next release.

Compiler warning messages:

All of base except drv/old is now being built with
VX_WARN_YES = -Wall -pedantic -ansi
Most warning messages have now been eliminated. The remaining messages should not be removed without looking hard at code.


get_control_double routine returned incorrect values for fields INDX and NELM.


This is now renamed devVXStats. The new device definitions are:
device(ai,VME_IO,devAiVXStats,"VX stats")
device(ao,VME_IO,devAoVXStats,"VX stats")
Thus if an application has an old base.dbd and baseLIBOBJS including definitions for this device support they must be modified.

SysMon device support

This is removed from base. It is for APS designed and build VME create system monitoring. The support code is available from APS if needed. NOTE: In some beta releases baseLIBOBJS, had an include for devSysmon.o. Applications using an old version of baseLIBOBJS will not build until this statement is deleted.


The enums for menus had a comma after last item.


recGblInitConstantLink for sgl was referencing wrong field.


This did not properly support multiple clients in multi-thread environment.


Modified to be faster.


Use maxCards from module_types.h instead of a #define


Allow CALC to be 40 characters. Increase rpbuf from 184 to 200


Add call to refresh_bits.


Bx becomes no prompt for mbbi and prompt for mbbo. It was the reverse before.


A new record type that replaces old wait record. It is like a calc record with an output and a delay. It makes the wait record obsolete.


dbGetPdbAddrFromLink is a new routine. It returns NULL for all except LINK_DB links, for which it returns the address of the associated DB_ADDR structure.

escape characters in database files

dbLoadDatabase, dbLoadRecords, and dbLoadTemplate all allow the standard C escape sequences in quoted strings. For example a string can contain: "\x00 \27 \t" Thus these sequences pass though the lexical analyzer .


A new routine in libCom. It is used to translate escape sequences. It is defined in file epicsString.h. It typical place to use this is on parm fields that contain escape sequences like "\x00 \27 \t".

Slow booting

iocs with big databases were taking a long time to boot. It was discovered that allocating and then freeing small amounts of memeory frequently resulted in a VERY long memory free list. This is now fixed.

boRecord, mbboRecord

init_record now initialized the RVAL field.


Benjamin Franksen at BESSY reported a serious bug in the routine ProcessCallback (not used in base). It has been fixed.

CALC fields

postfix and calcPerform (used by calcRecord) have been changed so that a 0 byte now ends the postfix expression. Also if postfix detects an illegal expression it generates a 0 length postfix string. When calcPerform is given a 0 length string it returns a error status. Thus calcRecord no longer causes the IOC to crash if an illegal CALC fields is loaded.


Many other minor problems, bugs, etc. were fixed.

Notes for Release 3.13 of EPICS Base

For Release 3.13 major changes have been made to EPICS base. The IOC Application Developer's Guide has been extensively modified and now describes release 3.13. If you are upgrading for a 3.12.xxx or earlier release you must obtain and read the new App Dev Guide.

In porting EPICS to multiple architectures, the previous method of using utilities to convert the database definition files to a binary file (default.dctsdr) caused problems. The problem is that the binary file is created on one architecture and used on another. This has worked so far for sun4 and hp hosts combined with motorola 68xxx processors. As support for more host and more ioc architectures is developed problems are appearing. This paper describes changes that solve the problems.

Because the changes result in extensive changes to database access, other changes are also made. The file syntax is changed. The internal database structures are simplified and also changed to make it easier to support runtime add/delete of record types and record instances.


Backward Compatibility


Overview of new database support

EPICS defines a set of database file formats. In addition any of these files can contain include statements. For each ioc, the application developer will create a set of files specifying the record types, devices, and drivers needed for that ioc. Normally a master file will be created which consists of include statements that bring in record, device, and driver definitions. Default configurations can be provided for new users or for particular applications.

Database configuration and utility tools access the database via the static database access library. This library reads the files. It provides routines for reading the information in the database and for creating and modifying record instances. Database definition files can be read incrementally.

Other database configuration tools (capfast, relational database systems, object oriented databases, etc.) can also be used as long as they generate record instances in the format described below. In this case, however, it is still necessary to generate the other files because they are needed by database access and for record and device support modules.

Tools are provided that generate C code from the database files. Header files are generated for menu and record type definitions. These header files are used by record and device support. In addition the record type definitions contain code which computes field offsets and sizes and record sizes. This code is compiled by the same cross compiler that is used to compile other ioc code. Thus cross platform compatibility is achieved.

In order to initialize an ioc, all files needed by that ioc have to be loaded. It is also necessary to load the record/device/driver support modules.

Everything is designed so that the following are possible:

An additional feature is that, for database configuration tools, record instance numeric fields and menu fields are stored as character strings. This solves the following problems. Another feature is is that it is now possible to distinguish link constants with a value of 0 from links that have never been given a value.

Other changes have been made while the opportunity was available.

Database Definition File format

Formats are defined for the following: See the Application Developer's Guide for details.

The menu choices replace the existing global, record, and conversion choices. The global and record choices are very similar and thus are easy to combine. The method of handling the old conversion choices is described below. That section also describes the breakpoint tables.

The record type description format has been completely changed. It now has a "real" syntax. It should be MUCH easier to generate new definitions.

The device choice and driver support definitions are defined so that it is easy to provide incremental definitions.

The record instance format is an extension of the 3.12.beta13 and later GDCT .db format.

Path and include statements are supported. This provides a powerful tool for combining definitions from many sources. The path is a unix style path, i.e. a colon separated list of directory names.

default.dctsdr conversion tools

NOTES The following tools are provided: For all utilities the required database definition files are generated from a dctsdr file from a previous epics release. A dctsdr file can be specified or else the utilities can be run in a directory which contains default.dctsdr (or a soft link with that name). sdr2recordtype also requires the header file generated by a previous epics release.

Conversions - replacement for DBF_CVTCHOICE

Let's briefly review database conversion, i.e. the LINR field for ai and ao records.

The allowed conversions are:

  1. None
  2. Linear
  3. Breakpoint Tables
The main complication results from the breakpoint tables. Previously EPICS handled breakpoint tables as follows:

The user prepares files in one of two formats: The first is just a list of "raw value, eng units value". The second format is a file with a header line followed by a table of raw data values that represent data at equally spaced engineering unit values. In either case the ascii data is converted to an internal binary format containing breakpoint tables. This data is part of default.dctsdr.

Here is how breakpoint table are now handled.

One other comment needs to be made about conversions. The Allen Bradley device support for the IXE module uses the LINR field in a non standard way. This was a mistake but compatibility must be maintained. Thus menuConvert contains a lot of choices used only by the IXE device support.

Converting existing applications

Database Configuration Tools

Application Source/Release Control

At the present time There are at least three Application Source/Release Control Systems in active use. The old technique of having cat_ascii and replace_ascii directories no longer work. In addition makesdr no longer exists. The new system offers developers far more flexibility but it also means that each Application Source/Release Control system has to be modified to take advantage of the new capabilities. Again the changes in RULES and makeBaseApp should make this task easier.

The document "EPICS IOC Applications: Building and Source/Release Control" describes a utility makeBaseApp which can be used for small applications. It also provides guidlines that can be used for large applications.

Locally developed Record/Device support


    pai->simm = pai->siml.value.value;

is changed to

NOTE: This change also has to be made to any device support that manipulates constant links. Normally this is only soft device support.

Because it is now possible to distinguish between null links (links that were never given a value) and CONSTANT links with the value 0, the code now handles initialization of constant links in a uniform manner. Several record types in previous versions had special code to handle the case of the value 0 for constant links. These have been changed.

dbFindRecdes            dbFindRecordType
dbFirstRecdes           dbFirstRecordType
dbNextRecdes            dbNextRecordType
dbGetRecdesName         dbGetRecordTypeName
dbGetNRecdes            dbGetNRecordTypes
dbFirstFielddes         dbFirstField
dbNextFielddes          dbNextField
dbGetChoices            dbGetMenuChoices
For now the old version will be supported. After one release they will go away.
    MENUS    += menuXXX.h
    RECTYPES += xxxRecord.h
long dbGetLink(struct db_link *,short dbrType,
        void *pbuffer,long *options,long *nRequest);
The last two arguments can be 0. options=0 means no options. nRequest=0 means scalar, i.e. retrieve one value.
long dbPutLink(struct db_link *,short dbrType,
        void *pbuffer,long nRequest);


The Add routines are no longer needed. The Get/Put routines are replaced by dbGetLink/dbPutLink.

All parm fields are now declared char * parm rather than char parm[] In addition the defines INSTIO_FLD_SZ to VXI_PARAM_SZ no longer exist. This is done so that unused links now use less storage.

Record Instance Definitions

Convert to proper format

All record instances must be capable of being loaded into an ioc via dbLoadDatabase, dbLoadRecords, or dbLoadTemplate. This is the same format that dbLoadRecords and dbLoadTemplate used in 3.12 releases. Note that if any files contain the statements:
        database(x) { nowhere() {


        database(x) {
These statements must be removed. They were in pre 3.12 releases.

CONSTANT Links with value "0"

Release 3.13 is now capably of distingushing between a null link (a link that is not given any value at all) and a constant link with the value 0. This cause problems for some old record instance files. For example if a record instance is defined as:
        record(fanout,name) {
Such definitions can be fixed by either completly removing the link definition or changing the value from "0" to "".

here is a complete list of record types and fields that may have this problem:

A good way to find these problems is to use grep. For example:
        grep SELL */*.db
This assumes that you are in directory that contains subdirectorys containing .db files.

IOC Startup files

The command dbLoad is no longer supported. The new method is to issue one or more dbLoadDatabase commands and any combination of dbLoadRecords and dbLoadTemplate commands.

Other Release Notes

IOC Test routines

Many changes have been made to the EPICS ioc test routines, i.e., routines given to the vxWorks shell. Please read the chapter "IOC Test Facilities" in the Application Developer's Guide for details.

Changes to Record and Device Support

Make rules and config files

The config environment has been extensively changed. BASE now has its own set of config files. Extensions will be able to use the base config files (for the version of base it is built against) and add it's own definitions. Changes to extensions will come at a future time.

GNU C++ for base

It is now possible to compile 3.13 EPICS base with the gnu C and C++ compilers. A C++ compiler that properly supports templates is required to build the new ca server and the gdd library.

log server

Thanks to William Lupton at KECK the log server will now (under the latest EPICS 3.13) obtain a new directory for the log file in response to SIGHUP.

CA repeater fix

Thanks to Kim Gillies, Bret Goodrich, and others at NOAO a problem has been discovered and fixed in the 3.12 CA repeater under solaris.

Portable CA server

A new CA server C++ class library is available. The server library is in libcas.a. The API is described in casdef.h. Doc is in progress. An example server tool can be found at base/src/cas/example. The server has been tested under sunos4 and solaris. A multi-threaded version of the new server for vxWorks is in progress.

Macro Substitution Library

The macro substitution library discussed in tech-talk is now part of epics base. Thus was contributed by Bill Lupton. The static database library uses this library. dbLoadRecords and dvbLoadTemplate also use it.

VXI Resource Manager fix

Thanks to Ric Claus of SLAC a bug has been isolated in the VXI resource manager.
Symptom: correct slot isnt located when EPICS_VXI_LA_BASE is set to something other than zero.

Access Security

If asSetFile has been set in a startup file and access security initialization fails, then iocInit returns -1 so that startup file does not finish.


On Unix this now calls fprintf(stderr instead of printf


This now calls printf instead of epicsPrintf to prevent deadlocks.

Native type for DBF_USHORT

Formerlly old database access, which does not have unsigned short called the native type DBR_FLOAT. It now calls it DBF_LONG

Allen Bradley Driver

Analog Output Block Transfers were being requested too frequently

If link_status command fails (3 times in succession) adapters are now immediatly declared down.

For btRead and btWrite, The driver now enforces a timeout of 5 seconds which is 1 second more than scanner itself enforces. This is so that if scanner throws away a BT request it will still timeout.

For btRead and btWrite is is no longer permissible to issue a new btRead or btWrite from tha callback routine.

The on line doc has the following two changes:


Support has been added by LBL. It still needs to be ansified.

New options for links

A forward link now works between IOCs but only if the field is PROC. When recGblFwdLink is executed, a 1 is written.
CA means always make it channel access link dbAccess (dbGetField dbPutField) make sure that link field strings are not longer than 39 characters. They allow M for MS and N for NMS

callback and scan task names

The task names have been changed to make them unique


If the strlen of the new field is >= field_size an error is returned.

event scanned records

Multiple priorities are now supported.
WARNING: Default PRIO is low thus old event scanned records may be executed at a lower priority then previous release.

Allen Bradley Stepper Motor Support (Ric Claus SLAC)

Support for the allen bradley stepper motor is available. See the APS EPICS Hardware Support page for details.


INITHOOKafterCaLinkInit1 is replaced by INITHOOKafterCaLinkInit
INITHOOKafterCaLinkInit2 no longer exists