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

Subject: Re: about talking to other record in device support and converting string to int
From: Mark Rivers <[email protected]>
To: ori spokoini <[email protected]>, "[email protected]" <[email protected]>
Date: Sun, 7 Oct 2018 22:05:51 +0000
Hi,


In general it is a good idea to avoid writing device support if you can avoid it.  From your example it sounds like you want to send a string to a device, read a string response, and convert the string response to a number.  That is a very common thing to do.  There is an existing device support called streamDevice which will do exactly that.  It means you don't need to write any C code, only a streamDevice protocol file:


http://epics.web.psi.ch/software/streamdevice/doc/


If you have already considered streamDevice and still want an answer to your specific questions, please let us know.


Mark



________________________________
From: [email protected] <[email protected]> on behalf of ori spokoini <[email protected]>
Sent: Sunday, October 7, 2018 4:38 AM
To: [email protected]
Subject: about talking to other record in device support and converting string to int

hi
assume i have record like that
ecord(stringout, "tlm") {
   field(OUT, "pro NPP NMS")
   field(SCAN, "I/O Intr")
   field(FLNK, "pro PP NMS")
}

record(stringin, "pro") {
   field(INP, "$tlm.VAL")
   field(SCAN, "Passive")
   field(DTYP, "devsup")
   field(FLNK, "sum PP NMS")
}

record(longin, "sum") {
}
and i want to change the value the longin record from devsup can i do it ?
somthing like :
int devfunc2 (longinRecord *x){
        x->val=30;
        return 0;
}
and another question :
 how can transfer number from stringin to calc record


tx

References:
about talking to other record in device support and converting string to int ori spokoini

Navigate by Date:
Prev: CA SERVER setup and build אייל פרחי/Eyal Farchi
Next: Re: CA SERVER setup and build Mark Rivers
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: about talking to other record in device support and converting string to int ori spokoini
Next: CA SERVER setup and build אייל פרחי/Eyal Farchi
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 07 Oct 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·