Experimental Physics and Industrial Control System
What you are seeing is a limitation of the default behavior of Channel Access with record fields of type DBF_STRING. It is not a problem with the acalcout record.
However, EPICS base 3.14.11 added support for long strings over channel access, and the caput/caget/camonitor can now use it. You need to add the -S option to the commands, and you need to append $ to the field name.
This is an attempt to write a 50 character string to the .CALC field of an acalcout record using the default settings of caput
corvette:calc/calcApp/src>caput 13LAB:userArrayCalc1.CALC 01234567890123456789012345678901234567890123456789
Old : 13LAB:userArrayCalc1.CALC 0
New : 13LAB:userArrayCalc1.CALC 012345678901234567890123456789012345678
Note that it only wrote 39 characters.
This is a caput using the -S and $ settings:
corvette:calc/calcApp/src>caput -S 13LAB:userArrayCalc1.CALC$ 01234567890123456789012345678901234567890123456789
Old : 13LAB:userArrayCalc1.CALC$ 012345678901234567890123456789012345678
New : 13LAB:userArrayCalc1.CALC$ 01234567890123456789012345678901234567890123456789
Note that it wrote all 50 characters.
Now use caget with the default settings:
corvette:calc/calcApp/src>caget 13LAB:userArrayCalc1.CALC
13LAB:userArrayCalc1.CALC 012345678901234567890123456789012345678
Note that it only read back 39 characters.
Now use caget with the -S and $ settings:
corvette:calc/calcApp/src>caget -S 13LAB:userArrayCalc1.CALC$
13LAB:userArrayCalc1.CALC$ 01234567890123456789012345678901234567890123456789
Note that it read back all 50 characters.
Mark
-----Original Message-----
From: Gofron, Kazimierz [mailto:[email protected]]
Sent: Tuesday, October 27, 2015 9:04 AM
To: [email protected]
Cc: Mark Rivers
Subject: Subject: RE: To read single element from waveform record
Mark,
The synApps that I am using is from 2013, and indeed the aCalcoutRecord.h has calc[80] set.
When database is created, the CALC has to be hardcoaded in the database, and seems to work for string longer than 36 char.
I tried to be set the aCalcoutRecord CALC value with caput and read it with caget. The field is truncated at about 38 chars when using caget/caput.
Kaz
Message: 4
Date: Mon, 26 Oct 2015 15:59:01 +0000
From: "Gofron, Kazimierz" <[email protected]>
To: "[email protected]" <[email protected]>
Subject: RE: To read single element from waveform record
Message-ID:
<[email protected]>
Content-Type: text/plain; charset="us-ascii"
Tim,
Regarding your post on extraction of single element from waveform:
http://www.aps.anl.gov/epics/tech-talk/2015/msg01340.php
The actual value of the CALC field is truncated from CALC, "a:=aa[0,0];b:=aa[1,1];c:=aa[2,2];d:=aa[3,3]
To
CALC, "a:=aa[0,0];b:=aa[1,1];c:=aa[2,2];d:=aa[
Any news on changing the length of the CALC field length to 80, as suggested in posts from 5 years ago?
http://www.aps.anl.gov/epics/tech-talk/2010/msg01574.php
Kazimierz Gofron
NSLS-II Controls Group
Brookhaven National Laboratory
(p) +1 (631) 344 5283
(f) +1 (631) 344 8085
(e) [email protected]<mailto:[email protected]>
(w) www.bnl.gov/nsls2<http://www.bnl.gov/nsls2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.aps.anl.gov/pipermail/tech-talk/attachments/20151026/7da4326e/attachment.html>
------------------------------
Message: 5
Date: Mon, 26 Oct 2015 16:07:58 +0000
From: Mark Rivers <[email protected]>
To: "'Gofron, Kazimierz'" <[email protected]>, "[email protected]"
<[email protected]>
Subject: RE: To read single element from waveform record
Message-ID:
<70AE7462E7AD054C89DCBA45343D499A659E4EAC@CARSMAIL2.CARS.APS.ANL.GOV>
Content-Type: text/plain; charset="us-ascii"
This SVN commit suggests that CALC field length is indeed 80 characters since Sept. 2012:
r15207 | mooney | 2012-09-13 14:12:06 -0500 (Thu, 13 Sep 2012) | 7 lines
CALC fields are now 80-characters long
And the .h file reflects this:
grep calc ../../include/aCalcoutRecord.h ...
typedef struct acalcoutRecord {
char calc[80]; /* Calculation */
} acalcoutRecord;
What version of the calc module are you using?
Mark
From: [email protected] [mailto:[email protected]] On Behalf Of Gofron, Kazimierz
Sent: Monday, October 26, 2015 10:59 AM
To: [email protected]
Subject: RE: To read single element from waveform record
Tim,
Regarding your post on extraction of single element from waveform:
http://www.aps.anl.gov/epics/tech-talk/2015/msg01340.php
The actual value of the CALC field is truncated from CALC, "a:=aa[0,0];b:=aa[1,1];c:=aa[2,2];d:=aa[3,3]
To
CALC, "a:=aa[0,0];b:=aa[1,1];c:=aa[2,2];d:=aa[
Any news on changing the length of the CALC field length to 80, as suggested in posts from 5 years ago?
http://www.aps.anl.gov/epics/tech-talk/2010/msg01574.php
Kazimierz Gofron
NSLS-II Controls Group
Brookhaven National Laboratory
(p) +1 (631) 344 5283
(f) +1 (631) 344 8085
(e) [email protected]<mailto:[email protected]>
(w) www.bnl.gov/nsls2<http://www.bnl.gov/nsls2>
- Replies:
- RE: Subject: RE: To read single element from waveform record Gofron, Kazimierz
- References:
- Subject: RE: To read single element from waveform record Gofron, Kazimierz
- Navigate by Date:
- Prev:
Re: theimagingsource cameras? Michael Davidsaver
- Next:
msi for windows IOC build ronaldo.mercado
- 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:
Subject: RE: To read single element from waveform record Gofron, Kazimierz
- Next:
RE: Subject: RE: To read single element from waveform record 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