According to the streamDevice_version file I seem to have 2.6.
I'll try upgrading it.
thanks so far.
William Kirstaedter (PP&B)
Fritz-Haber-Institut der MPG
Faradayweg 4-6
14195 Berlin
Tel: 030 8413 5405
Mail: [email protected]
Am 14.12.2018 um 09:31 schrieb Dirk Zimoch via Tech-talk:
Hi William,
I tested your template and protocol with several EPICS versions.
3.14.12:
While loading the template, an error is generated:
Bad Field value dbPutString received a string that is too long
Can't set "CRYVISIL:LEED:getEN.INP" to "@leed.proto
readModule(EN,CRYVISIL:LEED:ENgain,CRYVISIL:LEED:ENoffset,CRYVISIL:LEED:ENvalue,CRYVISIL:LEED:ENmonitorU,CRYVISIL:LEED:ENmonitorI)
terminal"
Error at or before ")" in path "." file "longlink.db" line 4
And then StreamDevice complaines about the link:
2018/12/14 09:19:10.227713 _main_ CRYVISIL:LEED:getEN: Empty I/O link.
Forgot the leading '@' or confused INP with OUT or link is too long ?
2018/12/14 09:19:10.227732 _main_ CRYVISIL:LEED:getEN: Record
initialization failed
This is expected because of the limitation of EPICS 3.14. But
StreamDevice tells you what is wrong.
3.15.5, 3.16.1, 7.0.1:
No problem loading the template.
StreamDevice sees the full link and successfully initializes the record.
Processing the record works.
This is what streamDevice sees of the protocol:
> streamReportRecord CRYVISIL:LEED:getEN
CRYVISIL:LEED:getEN: leed.proto
readModule(EN,CRYVISIL:LEED:ENgain,CRYVISIL:LEED:ENoffset,CRYVISIL:LEED:ENvalue,CRYVISIL:LEED:ENmonitorU,CRYVISIL:LEED:ENmonitorI)
terminal
active command=none flags=0x0000
readModule {
extraInput = error;
lockTimeout = 5000; # ms
readTimeout = 100; # ms
replyTimeout = 1000; # ms
writeTimeout = 100; # ms
pollPeriod = 1000; # ms
maxInput = 0; # bytes
inTerminator = "\r";
outTerminator = "\r";
separator = "";
out "REN";
in
"REN\x0d\x00\x0aEN%(CRYVISIL:LEED:ENgain)f%(CRYVISIL:LEED:ENoffset)f%(CRYVISIL:LEED:ENvalue)f%(CRYVISIL:LEED:ENmonitorU)f%(CRYVISIL:LEED:ENmonitorI)f";
}
Everything is OK.
Maybe you are using an older version of StreamDevice, where the
buffers were still limited to 80 chars?
The current version 2.8.8 is available here:
https://github.com/paulscherrerinstitute/StreamDevice
Dirk
On 13.12.2018 14:56, Dirk Zimoch via Tech-talk wrote:
Hi William,
Even though the INP Length in EPICS 7 is not unlimited, StreamDevice
may nor be able to read it. 78 bytes was the effective limit of
INP/OUT in EPICS 3.14. Meanwhile I have changed my buffers from 80 to
256 bytes but not yet to "unlimited" (which is a bigger change).
However your string is cur at 78 chars like in EPICS 3.14.
I will check this with EPICS 7....
Dirk
On 13.12.2018 09:46, William Kirstaedter via Tech-talk wrote:
unlimited cant be the case, unfortunately. I'm running EPICS7 and
facing the following error when starting the IOC:
2018/12/13 09:42:51.409543 _main_ Missing ')' after substitutions
'readModule(EN,CRYVISIL:LEED:ENgain,CRYVISIL:LEED:ENoffset,CRYVISIL:LEED:ENvalue,LEED_01'
2018/12/13 09:42:51.409621 _main_ CRYVISIL:LEED:getEN: Protocol
parse error
2018/12/13 09:42:51.409642 _main_ CRYVISIL:LEED:getEN: Record
initialization failed
with these records and streamprotocol:
# Energy
record(stringin, "$(P):$(R):getEN") {
field(DTYP,"stream")
field(INP,"@leed.proto
readModule(EN,$(P):$(R):ENgain,$(P):$(R):ENoffset,$(P):$(R):ENvalue,$(P):$(R):ENmonitorU,$(P):$(R):ENmonitorI)
$(PORT)")
}
record(ai, "$(P):$(R):ENgain") {
field(DESC,"Energy Gain")
field(EGU,"eV")
field(PREC,"2")
}
record(ai, "$(P):$(R):ENoffset") {
field(DESC,"Energy Offset")
field(EGU,"eV")
field(PREC,"2")
}
record(ai, "$(P):$(R):ENvalue") {
field(DESC,"Energy Value")
field(EGU,"eV")
field(PREC,"2")
}
record(ai, "$(P):$(R):ENmonitorU") {
field(DESC,"Energy Voltage Monitor")
field(EGU,"eV")
field(PREC,"2")
}
record(ai, "$(P):$(R):ENmonitorI") {
field(DESC,"Energy Current Monitor")
field(PREC,"2")
field(EGU,"A")
}
------------
OutTerminator= CR;
InTerminator= "\r\000\n>";
readModule{
# $1 : Module Name -> REN (read energy)
out"R\$1";
# answer: R $1 r NUL n $1 (what out "typed in" plus return)
$1|SP|GAIN|SP|OFFSET|SP|VALUE|SP|U-monitor|SP|I-monitor (the actual
answer)
# >REN
# EN +0 +500 +500 +500.85 +1.5653E-06
in"R\$1\r\000\n\$1%(\$2)f%(\$3)f%(\$4)f%(\$5)f%(\$6)f";
}
William Kirstaedter (PP&B)
Fritz-Haber-Institut der MPG
Faradayweg 4-6
14195 Berlin
Tel: 030 8413 5405
Mail:[email protected]
Am 12.12.2018 um 17:29 schrieb Johnson, Andrew N.:
On 12/12/18 8:59 AM, William Kirstaedter via Tech-talk wrote:
Short Question:
Whats the maximum length of a record field? how many chars?
record(ai,"record_name"){
field(DESC, "I_mean_this")
field(INP, "how_long_can_this_be")
}
Longer answer:
That depends on the field definition for the record type. DESC is
defined in dbCommon.dbd (a kind of super-class used by all record
types) as:
field(DESC,DBF_STRING) {
prompt("Descriptor")
promptgroup("10 - Common")
size(41)
}
That means it's a DBF_STRING and the size() entry says it can hold
up to 41 characters, but there must be a zero-byte terminator so
the limit is really 40 (which matches the Channel Access
dbr_string_t typedef).
For something like the ZRST field of the mbbi record which defines
an enumeration string, the size is given as 26 which is the size of
the enumeration strings that Channel Access can send in a struct
dbr_gr_enum.
An INP or OUT field is a link and for these the maximum length
depends on the version of EPICS you're running; it might be 40 for
older versions, 80, 256 for some or unlimited for EPICS-7.
HTH,
- Andrew
--
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
----------------------------------------------------------------------
Das FHI verarbeitet, speichert und loescht Daten im Rahmen seiner
Geschaeftstaetigkeit gemaess der Datenschutz-Grundverordnung (DSGVO)
[General Data Protection Regulation (GDPR)] der Europaeischen Union.
- References:
- record field max length? William Kirstaedter via Tech-talk
- Re: record field max length? Johnson, Andrew N. via Tech-talk
- Re: record field max length? William Kirstaedter via Tech-talk
- Re: record field max length? Dirk Zimoch via Tech-talk
- Re: record field max length? Dirk Zimoch via Tech-talk
- Navigate by Date:
- Prev:
Re: record field max length? Dirk Zimoch via Tech-talk
- Next:
Re: record field max length? Dirk Zimoch 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:
Re: record field max length? Dirk Zimoch via Tech-talk
- Next:
motor R6-11 released Peterson, Kevin M. 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
|