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

Subject: RE: Change input links run-time in a db
From: "Pedersen, UK (Ulrik)" <[email protected]>
To: "Luedeke Andreas" <[email protected]>
Cc: [email protected]
Date: Thu, 8 May 2008 16:16:39 +0100
Hi Andreas,

What I forgot to mention in my original message was that I see the same
error message: 
    Illegal Database Request Type PV: result.INP error detected in
    routine: dbPut - database request type is 0

The work around (setting the sCalcout OUT field to be type CA) also
works for me! - I also do not understand why - I had tried CP before but
never CA.


I know the sCalcout writes it's string value to the SVAL field and not
to VAL. This doesn't seem to create problems in other cases where I've
used the sCalcout OUT field to write to a stringout record for instance
(using PP) - or an asyn records AOUT field. Since I have often done this
I was quite surprised when it didn't work for the waveform INP field.


I don't have any problems using the sCalcout OUT field to write to and
process a stringout record. Just using PP will do the trick without the
need for a FLNK.

Thanks for the workaround!

Cheers,
Ulrik
 

-----Original Message-----
From: Luedeke Andreas [mailto:[email protected]] 
Sent: 08 May 2008 15:36
To: Pedersen, UK (Ulrik)
Cc: [email protected]
Subject: Re: Change input links run-time in a db

Hi Ulrik,
the problem seems to arise from the fact, that the scalcout writes its
VAL field instead of its SVAL field.
I get the error message on the console:

    Illegal Database Request Type PV: result.INP error detected in
    routine: dbPut - database request type is 0

This looks to me like a bug (sorry: undesired feature) of the scalcout
record.

I found a strange workaround, maybe some EPICS guru can explains why it
works:

    record(scalcout, select) {
      field(DTYP, "Soft Channel")
      field(INPA, "1")
      field(CALC, "PRINTF('wave%d PP',A)")
      field(OOPT, "Every Time")
      field(OUT,  "result.INP CA")
      field(DOPT, "Use CALC")
      field(FLNK, "result.PROC CA")
    }

I just made the OUT link a channel access link and added an FLNK to
process the modified waveform record, again an CA is required.
This works, but don't ask me why :)

Of course an INLINK can be as well a DOUBLE (constant) or a string (PV),
it's up to the record to decide on what type of data to write.
But I found the same behaviour when first writing to an stringout
records VAL field:
it only works if I use CA type OUTLINK _and_ FLNK.


Cheers
Andreas

Pedersen, UK (Ulrik) wrote:
> Hello,
>
> I'm trying to write a database where a waveform record (DTYP soft) can

> have it's INP field changed at run-time to switch between one of two 
> other waveform records.
>
> Basically I need a sort of multiplexing functionality to let one 
> waveform record collect the data from one of several other waveform 
> records. This can be done by changing the INP field of the resulting 
> waveform record to point to any one of the other waveforms.
>
> When changing the waveform INP field with a dbpf command on the IOC 
> shell, things work Ok... When changing the INP field with a caput 
> (client side) in Linux shell, things work Ok...
>
> However, I need to do the switching directly in the database. For this

> purpose I am using an sCalcout record to create the string - using the

> OUT field of the sCalcout to write to the waveform INP field... - This

> doesn't work and I can't figure out why.
>
> Does anyone know what could be the problem with my database (see 
> below) or have any suggestions how to program this kind of 
> functionality in a database? (not using genSub records or snl 
> programs...)
>
>
> record(waveform, wave1) {
>   field(PINI, "YES")
>   field(DTYP, "Soft Channel")
>   field(NELM, "10")
>   field(FTVL, "DOUBLE")
> }
>
> record(waveform, wave2) {
>   field(PINI, "YES")
>   field(DTYP, "Soft Channel")
>   field(NELM, "10")
>   field(FTVL, "DOUBLE")
> }
>
> record(scalcout, select) {
>   field(DTYP, "Soft Channel")
>   field(CALC, "PRINTF('wave%d PP',A)")
>   field(OOPT, "Every Time")
>   field(OUT, "result.INP PP")
>   field(DOPT, "Use CALC")
> }
>
> record(waveform, result) {
>   field(DTYP, "Soft Channel")
>   field(NELM, "10")
>   field(FTVL, "DOUBLE")
> }
>
>
> Appriciate any help or suggestions. Thanks.
>
> Ulrik
>
> --------------------------------------------------------------------
>
>   Ulrik Pedersen               phone: +44(0)1235-778580
>   Software Engineer            email: [email protected]
>
>       Diamond Light Source Ltd.
>       Rutherford Appleton Laboratory,
>       Chilton, Didcot
>       OxfordShire OX11 0DE
>
> --------------------------------------------------------------------
> <DIV><FONT size="1" color="gray">This e-mail and any attachments may
contain confidential, copyright and or privileged material, and are for
the use of the intended addressee only. If you are not the intended
addressee or an authorised recipient of the addressee please notify us
of receipt by returning the e-mail and do not use, copy, retain,
distribute or disclose the information in or attached to the e-mail.
> Any opinions expressed within this e-mail are those of the individual
and not necessarily of Diamond Light Source Ltd. 
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any
attachments are free from viruses and we cannot accept liability for any
damage which you may sustain as a result of software viruses which may
be transmitted in or with the message.
> Diamond Light Source Limited (company no. 4375679). Registered in 
> England and Wales with its registered office at Diamond House, Harwell

> Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United 
> Kingdom </FONT></DIV>
>
>   

<DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
</FONT></DIV> 


Replies:
Re: Change input links run-time in a db Tim Mooney
References:
Change input links run-time in a db Pedersen, UK (Ulrik)
Re: Change input links run-time in a db Luedeke Andreas

Navigate by Date:
Prev: Re: Change input links run-time in a db Luedeke Andreas
Next: Re: Change input links run-time in a db Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Change input links run-time in a db Luedeke Andreas
Next: Re: Change input links run-time in a db Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·