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  2021  2022  2023  2024  <2025 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  <2025
<== Date ==> <== Thread ==>

Subject: Re: devSnmp, device replying with a string containing units
From: Marco Filho via Tech-talk <tech-talk at aps.anl.gov>
To: Andrea Celentano <andrea.celentano at ge.infn.it>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 6 Mar 2025 15:55:49 +0000

Hi, Andrea

According to the documentation I found here: https://groups.frib.msu.edu/controls/files/devSnmp.html in the topic set_type you need to set the type of the variable that you are getting. 'i' for integer, 'f' for floating point, 's' for string.

An example record that I got from one IOC:

record(ai, "$(P)$(R)InputVoltage$(CH)-R") {
    field(DESC, "Present input voltage in channel $(CH)")
    field(EGU,  "RMS V (AC)")
    field(DTYP, "Snmp")
    field(SCAN, ".5 second")
    field(PREC, "1")
    field(INP,  "@$(HOST) $(COMMUNITY) UPS-MIB::upsInputVoltage.$(CH) INTEGER: 100 i")
}

Maybe that helps? I'm not sure.

Cheers,

Marco



From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Andrea Celentano via Tech-talk <tech-talk at aps.anl.gov>
Sent: 06 March 2025 15:21:26
To: tech-talk at aps.anl.gov
Subject: devSnmp, device replying with a string containing units
 
Dear colleagues, 
I have a device that can be programmed using SNMP (Wiener MPOD crate). 

A typical reply to the command:

snmpget  -v 2c -m +WIENER-CRATE-MIB -c guru 10.152.72.10 outputVoltage.u0


Looks as:

WIENER-CRATE-MIB::outputVoltage.u0 = Opaque: Float: 0.000000 A


Where, as you see, the device replies with the number (0.0000) containing also units (A)

My record to read this is:

record(ai, “wienerCh0:v")
{
  field(DESC, “Voltage")
  field(DTYP, "Snmp")
  field(SCAN, "$(SCAN)")
  field(PREC, "3")
  field(EGU,  “V")
  field(INP,  “@10.152.72.10 guru WIENER-CRATE-MIB::outputVoltage.u0 Float: 100")
  field(ADEL, "1.0")  
}

If I execute my IOC, I get the error:

2025/03/06 15:00:49  devSnmp AI read error 'wienerCh0:v' : epicsScanDouble failed on '5.000000 V'

As if the IOC is not able to parse the “Volt” units. And indeed, the PV is not properly populated:

caget wienerCh0:v

wienerCh0:v            0


May I ask you if any of you also faced this issue? 

Thanks,
Andrea




References:
devSnmp, device replying with a string containing units Andrea Celentano via Tech-talk

Navigate by Date:
Prev: devSnmp, device replying with a string containing units Andrea Celentano via Tech-talk
Next: Request for Help with EPICS Asyn Build Issues Jonathan Hai 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  2021  2022  2023  2024  <2025
Navigate by Thread:
Prev: devSnmp, device replying with a string containing units Andrea Celentano via Tech-talk
Next: Request for Help with EPICS Asyn Build Issues Jonathan Hai 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  2021  2022  2023  2024  <2025
ANJ, 06 Mar 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·