Hi Eric,
This 'trick' overcomes the limitation of finite string size.
For completeness, I include the relevant parts of db, and .proto files.
getGains {out "CALIB:GAI?"; in "CALIB:GAI?\10\06"
"%(\$1Gain:Sts-RB)d,"
"%e,"
"%(\$1Gain:2-RB.VAL)e,"
"%(\$1Gain:3-RB.VAL)e,"
"%(\$1Gain:4-RB.VAL)e,"
"%(\$1Gain:5-RB.VAL)e,"
"%(\$1Gain:6-RB.VAL)e,"
"%(\$1Gain:7-RB.VAL)e,"
"%(\$1Gain:8-RB.VAL)e";
InTerminator = CR LF; }
-----
record(ai, "$(Sys)$(Dev)Gain:1-RB") {
field(DESC, "COMPENSATION FACTOR A IN")
field(DTYP, "stream")
field(INP, "@I404.protocol getGains($(Sys)$(Dev)) $(PORT) 0")
field(PINI, "YES")
field(SCAN, "Passive")
}
record(ai, "$(Sys)$(Dev)Gain:2-RB") {
field(DESC, "COMPENSATION FACTOR B IN")
}
...
record(ai, "$(Sys)$(Dev)Gain:8-RB") {
field(DESC, "COMPENSATION FACTOR 3300pF D IN")
}
Kaz
________________________________________
From: Eric Norum [[email protected]]
Sent: Thursday, April 28, 2016 12:35 PM
To: Gofron, Kazimierz
Cc: Zhang Yuliang; [email protected]
Subject: Re: stream Device I/O error
What version of StreamDevice are you using? I’ve got a crate monitor prototype file that assigns to a lot more than four records:
query {
out "Q";
in ":"
"SN=%(\$1Serial.VAL)39[^,],"
"UN=%(\$1Name.VAL)39[^,],"
"IP=%*[^,],"
"V3=%d,"
"V5=%(\$1VP5.RVAL)d,"
"V+12=%(\$1VP12.RVAL)d,"
"V-12=%(\$1VM12.RVAL)d,"
# "VAUX=%*[^,],"
"T1=%(\$1Temp1.VAL)d,"
"T2=%(\$1Temp2.VAL)d,"
"T3=%(\$1Temp3.VAL)d,"
"T4=%(\$1Temp4.VAL)d,"
"F1=%(\$1Fan1.VAL)d,"
"F2=%(\$1Fan2.VAL)d,"
"F3=%(\$1Fan3.VAL)d,"
"F4=%(\$1Fan4.VAL)d,"
"F5=%(\$1Fan5.VAL)d,"
"F6=%(\$1Fan6.VAL)d,"
"F7=%(\$1Fan7.VAL)d,"
"F8=%(\$1Fan8.VAL)d,"
"F9=%(\$1Fan9.VAL)d,"
"OT=%*[^,],"
"OV=%*[^,],"
"OC=%*[^,],"
"PS1=%(\$1PS1status.VAL)d,"
"PS2=%(\$1PS2status.VAL)d,"
"MSG=%*[^,],"
"SW=%(\$1PowerSwitch.VAL)d,"
"PROT=%*[^,],"
"I3=%*[^,],"
"I5=%*[^,],"
"I12=%*[^,],"
"I-12=%*[^,],"
"CODE=%(\$1Firmware.VAL)39[^,],"
"ENET=%*[^,],"
"POH=%(\$1HoursOn.VAL)g,"
"MAXTMP=%(\$1MaxTemp.VAL)g,";
ExtraInput = Ignore;
On Apr 28, 2016, at 9:20 AM, Gofron, Kazimierz <[email protected]<mailto:[email protected]>> wrote:
Hi Yuliang,
Redirection works only for up to 4 values read in (3 redirections). At least that is what I am seeing when increasing number of redirections.
--
Eric Norum
[email protected]<mailto:[email protected]>
- References:
- stream Device I/O error Gofron, Kazimierz
- Re: stream Device I/O error Zhang Yuliang
- Re: Re: stream Device I/O error Zhang Yuliang
- RE: Re: stream Device I/O error Gofron, Kazimierz
- Re: stream Device I/O error Eric Norum
- Navigate by Date:
- Prev:
Frame grabber for linux box Kevin Jordan
- Next:
RE: calc question Gofron, Kazimierz
- 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: stream Device I/O error Eric Norum
- Next:
Re: stream Device I/O error Dirk Zimoch
- 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
|