Experimental Physics and Industrial Control System
|
On Mar 10, 2021, at 4:19 PM, Randall Cayford via Tech-talk <tech-talk at aps.anl.gov> wrote:
I’m trying to use StreamDevice to pass a long string to a controller. Since it’s much longer than 40 characters, I’m using a waveform. Here’s the protocol entry (though I’ve tried many other variants of the format specifier):
sety {
# separator = " ";
out “Y(%s)";
in "YOKAY (%s)";
}
Here’s the db entry:
record (waveform, "$(PREFIX):ydata")
{
field (DTYP, "stream")
field (INP, "@mems.proto sety $(BUS)")
field (NELM, 100)
field (FTVL, "CHAR")
field (SCAN, Passive)
}
Using an example:
caput -s mems:ydata “68 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25”
I’ve tried a number of other variants , of course.
What gets sent in this case is “YD”. So it’s pulling the first number, doing a string to integer conversion, then sending that ascii character (D) and ignoring the rest of the string.
Any ideas?
I think you may have mis-read the caput options, you need to use the upper-case S option to put a string to a PV that holds an array of characters, like this:
caput -S mems:ydata "68 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25"
That’s assuming that the string you want to send was exactly what you have in quotes.
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|
- References:
- StreamDevice with waveforms Randall Cayford via Tech-talk
- Navigate by Date:
- Prev:
Writing/Reading PVs from/to a DB Question Manoussakis, Adamandios via Tech-talk
- Next:
Re: Writing/Reading PVs from/to a DB Question Johnson, Andrew N. via Tech-talk
- 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
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
StreamDevice with waveforms Randall Cayford via Tech-talk
- Next:
Writing/Reading PVs from/to a DB Question Manoussakis, Adamandios via Tech-talk
- 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
2018
2019
2020
<2021>
2022
2023
2024
|
ANJ, 10 Mar 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|