Thanks for the fast answer.
Then the problem must be of a different kind (I am rather new to EPICS).
I have the following database records:
record(stringout, "$(P):RAW") {
field(DTYP, "stream")
field(DESC, "RAW lakeshore communication")
field(OUT, "@Huginn.proto setRAW $(PORT) $(ADDR)")
field(SCAN, "Passive")
}
record(waveform, "$(P):RAW2") {
field(DTYP, "stream")
field(OUT, "@Huginn.proto setRAW $(PORT) $(ADDR)")
field(FTVL, "CHAR")
field(DESC, "RAW waveform lakeshore record")
field(SCAN, "Passive")
}
with the protocol file:
# /// Raw text string send, if anything is returned it will be in val
setRAW {
ExtraInput = Ignore;
out "%s";
in "%39c";
}
The stringout record works as expected sending the full string to the
LakeShore, while the waveform record does not work, I get the following
errors when trying to load the database in iocsh
#Load your database defining the EPICS records
dbLoadRecords(Huginn.db,"P=Huginn,PORT=portA,ADDR=7777")
Record "Huginn:RAW2" does not have a field "OUT"
Error at or before ")" in path "modules/m-epics-Huginn/builddir/db"
file "Huginn.db" line 43
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5-2015-08 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Oct 9 2015
############################################################################
2016/09/20 14:10:45.741826 _main_ Huginn:RAW2: Empty I/O link. Forgot
the leading '@' or confused INP with OUT ?
2016/09/20 14:10:45.742026 _main_ Huginn:RAW2: Record initialization failed
Sorry for the lengthy mail,
Best
Bo
On 2016-09-20 13:10, Mark Rivers wrote:
Hi Bo,
The waveform record can be used for both input and output.
This is from the documentation for StreamDevice for the waveform record:
************************
If FTVL=="CHAR" or FTVL="UCHAR":
In this case, the complete waveform is treated as a large single string of size NORD. No separators are printed or expected.
Output: x=range(VAL,0,NORD)
The first NORD characters are printed, which might be less than NELM.
Input: VAL=x, NORD=length(x)
A maximum of NELM-1 characters can be read. NORD is updated to the index of the first of the trailing zeros. Usually, this is the same as the string length.
************************
Mark
______
__________________________________
From: [email protected] [[email protected]] on behalf of Bo Jakobsen [[email protected]]
Sent: Tuesday, September 20, 2016 3:34 AM
To: [email protected]
Subject: Long string command to device
Hi,
I am working on modifying an EPICS interface for a LakeShore 336 (LS336)
temperature controller.
In that connection I need to send strings to the LS336 which extends 40
characters.
I found the following thread:
http://www.aps.anl.gov/epics/tech-talk/2016/msg00887.php
which discusses a similar problem, and suggests to use waveform records
and StreamDevice (which I am already using).
However, I am unable to get this to work.
As I read the documentation of waveform records they are only for input,
and hence does not allow to set the OUT field (I am using EPICS 3.14)
Can anyone help with a solution to this problem?
Best
Bo Jakobsen
- Replies:
- RE: Long string command to device michael.abbott
- References:
- Long string command to device Bo Jakobsen
- RE: Long string command to device Mark Rivers
- Navigate by Date:
- Prev:
QUERY palak shimpee
- Next:
RE: Long string command to device michael.abbott
- 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: Long string command to device Mark Rivers
- Next:
RE: Long string command to device michael.abbott
- 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
|