EPICS Home

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

Subject: Re: stringout in softIOC
From: Andrew Johnson <[email protected]>
To: Al Honey <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Mon, 3 Apr 2017 15:43:38 -0500
Hi Al,

On 04/03/2017 03:05 PM, Al Honey wrote:
> Ahhh you are correct, scrolling back I see a syntax error.
> 
> I don't seem to find a solution for what I am trying to do,
> which is passing a string value through a LNK field of a
> sequence record, where the LNK points to a stream stringout
> record. 
> 
> If I set the sequence record to :
>    field(LNK1,"param.VAL setup PP")

This isn't really a legal output link specification, but you won't get a
syntax error from the parser. The word "setup" is extraneous and will be
completely ignored.

> The record result is:
>    LNK1:DB_LINK param.VAL PP NMS  
> 
> That is, the string value is deleted.

… as I said above. All the LNK1 field does is tell the sequence record
where to write its value. For each group the seq record get a DOUBLE
value through its DOL<n> link and puts that same value through the
LNK<n> link.

> And, seemingly, no form of manipulation of the sequence
> record's DOL1 field seems to work.

The sequence record can only handle numeric (double) values itself, so
you can't use one to write a string value to some other record, which is
what you appear to be trying to do. The synapps calc module provides an
sseq (string sequence) record which handles strings though, or you could
just point each LNK<n> for which you want the sequence to write strings
to a stringout record's .PROC field to actually do the string writing.
You would put the string value to be written into the stringout.VAL
field, for the reasons described in my previous email, or you can read
the string value to be written from some other PV by setting the
stringout's DOL field.

Oh, and if to update the value of a link field you must use a CA link to
write the link's value, you can't use a DB link to modify a link field.
Updating links is actually a slow and disruptive operation, it involves
taking a global lock on the whole IOC database and stopping all database
processing while the lock-sets are recomputed (also fixed in 3.16 thanks
to Michael Davidsaver) so I wouldn't use this approach on an IOC that is
doing fast real-time processing which involves the database.

HTH,

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
stringout in softIOC Al Honey
Re: stringout in softIOC Andrew Johnson

Navigate by Date:
Prev: Re: stringout in softIOC Andrew Johnson
Next: RE: Two VxWorks IOCs in one VME Crate keith.baker
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: stringout in softIOC Andrew Johnson
Next: Dynamic alarm server John . Holt
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024