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

Subject: RE: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT}
From: Abadie Lana <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 18 Oct 2011 18:39:23 +0200
Thanks a lot for your clarifications!
Lana
________________________________________
From: Andrew Johnson [[email protected]]
Sent: Tuesday, October 18, 2011 6:13 PM
To: Abadie Lana
Cc: [email protected]
Subject: Re: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT}

Hi Lana,

On 2011-10-18 Abadie Lana wrote:
> I had a look at the code you mentioned to see if it is a constant or not.
> Sorry for my stupid question here... but  a link of type constant in EPICS
>  is always a double/long? it cannot be a string?

With the current IOC code constants cannot be non-numeric, because there's no
way for the IOC to distinguish between such constant strings and a Channel
Access PV, as you discovered in your test:

> record(stringout, "$(PSH)-COS:TraceMessage") {
>   field(DTYP, "Soft Channel")
>   field(DOL, "Test string for dol")
> }
>
> epics> dbpr RF-ICH1-COS:TraceMessage 4
> DOL:CA_LINK Test NPP NMS

Your DOL constant string became a CA link.

There are several ways to provide constant string values for use in a
database; setting the VAL field of a stringin or stringout record in a .db
file is the simplest, but people have used other methods — autosave/restore,
putting dbpf statements in their st.cmd files, using a sequence program etc.

> and in the case of a timestamp
>
> record(stringin, "$(PSH)-COS:CurrentTime") {
>   field(DESC, "Current Date and Time of the IOC")
>   field(DTYP, "Soft Timestamp")
>   field(SCAN, "1 second")
>   field(PINI, "YES")
>   field(INP, "@%d/%m/%Y %H:%M:%S")
> }
>
> I have this, INST_IO (which corresponds to the entry in the dbd file for
> DTYP). But is it a constant for you?

A Soft Timestamp stringin device support expects an INST_IO address, which is
a different kind of link than the Soft Channel device supports use.  The
leading @ sign in the field's value indicates that the characters following it
are to be placed in the string field of the struct instio value for the device
support to parse as it likes.

HTH,

- Andrew
--
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham


References:
EPICS Workshop Fall 2011 Dirk Zimoch
Re: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Andrew Johnson
RE: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Abadie Lana
Re: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Andrew Johnson

Navigate by Date:
Prev: Re: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Andrew Johnson
Next: Re: aSub and zero length arrays Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Andrew Johnson
Next: Re: Fwd: FW: EPICS driver for acqiris cPCI digitizer is available on epics.sf.net Silver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·