EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Only integer value from CAEN VME protocol
From: Christopher Wells Heidt <[email protected]>
To: [email protected]
Date: Wed, 27 May 2015 16:49:06 +0100
I'm relatively new to epics and writing protocols, so please forgive
me if I muddle up my terminology.

I'm trying to communicate with a CAEN VME8100 over a network.  I
would like to be able to read out the various channels and write
them into epics to be displayed in an edl panel. I have most of
this done, however, I am only reading out integer values.  So for
example, rather than reading the voltage as 5.23 V I am readding 5 V.
It appears that this is not a rounding error, instead I am only
reading the first digit of the output.

My protocol calling in the voltage looks something like:

readVMON0 {
    out "$CMD:MON,CH:0,PAR:VMON";
    in  "#CMD:OK,VAL:%(PV_NAME.RVAL)f";
}

I have a header to the protocol file:

interminator = "\r\n";
outterminator = "\n";
replytimout = 2000;
separator   = "";

Finally I have the PV in the IOC database as:

record(ai, "PV_NAME") {
    field(DTYP,"stream")
    field(SCAN,"10 second")
    field(PREC,"2")
    field(INP,"@CAEN.protocol readVMON0 VMEport 0")
}

where VMEport is defined in st.cmd and holds the network address of
the device.  I have no idea what the trailing zero is... it came that
way.

Testing this earlier I put a space between the PV name and type so
that the "in" line in the protocol file looked like:

in  "#CMD:OK,VAL:%(PV_NAME.RVAL) f";

and got an error:

PV_NAME: Input "11.98" does not match format % f

so at some point I must be reading in the whole thing..

Thanks for taking a look
-Chris

Replies:
Re: Only integer value from CAEN VME protocol Eric Norum

Navigate by Date:
Prev: RE: Motor R6-9 build issues on Windows Heesterman, Peter J
Next: Re: Only integer value from CAEN VME protocol Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Motor R6-9 build issues on Windows Mark Rivers
Next: Re: Only integer value from CAEN VME protocol Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·