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  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: CA Gateway converts int/float value to hex
From: "andrej.manojlovic--- via Tech-talk" <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Wed, 28 Jul 2021 22:41:23 +0200 (CEST)
Dear EPICS users,

I've encountered a situation with CA Gateway where a `caput` to PV through
Gateway behaves differently compared to a `caput` directly to IOC, bypassing the
gateway.

If I caput to an IOC (no Gateway involved):
$ EPICS_CA_ADDR_LIST=ioc_address caput x:ai 10w
The record will store the value 10. The excess 'w' character at the end is
ignored, which is OK.

However when doing the same through CA Gateway:
$ EPICS_CA_ADDR_LIST=gateway_address caput x:ai 10w
The 'w' character at the end will cause the record to store value 16 (10 hex),
which I don't expect. The 'w' is just an example and can be replaced by a
string.

Is this implicit conversion to hex known behavior when using CA Gateway? Can it
be changed to behave the same way as a caput directly to IOC behaves?

The use case is strange and I know better than to put random characters after
the value I want to set, but we have a situation where an operator might
habitually put the 'w' because the PV is a setpoint that controls power supply
output. In that case a 'caput PS-Power 100w' would result in PS-Power being set
to 256 instead of the expected 100 (Watts).

Versions used:
OS: RHEL8
base-7.0.6
ca-gateway-2.1.2
pcas-4.13.2

CA Gateway startup parameters:
./gateway \
  -sip 192.168.56.102 \
  -cip "127.0.0.1:7001" \
  -access /path/to/access.acf \
  -no_cache

Regards,
Andrej

Replies:
Re: CA Gateway converts int/float value to hex Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Drivers for Thorlabs camera, Gentec power meter? Feister, Scott via Tech-talk
Next: RE: Drivers for Thorlabs camera, Gentec power meter? Mark Rivers via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: RE: Drivers for Thorlabs camera, Gentec power meter? Feister, Scott via Tech-talk
Next: Re: CA Gateway converts int/float value to hex Johnson, Andrew N. via Tech-talk
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  <20212022  2023  2024 
ANJ, 28 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·