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