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  <20182019  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  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Re: SNMP device support
From: 吴煊 <[email protected]>
To: "priller, john" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 12 Jun 2018 10:46:44 +0800 (GMT+08:00)
It works. Many thanks.

Cheers!
-----原始邮件-----
发件人:"Priller, John" <[email protected]>
发送时间:2018-06-11 18:26:12 (星期一)
收件人: "吴煊" <[email protected]>
抄送: "[email protected]" <[email protected]>
主题: Re: SNMP device support

Xuan;


By default the driver fetches data from the SNMP remote host using strings, but you can specify that it use the native data format of the OID by adding the 'n' flag to your INP specification.  For example:


field(INP,  "@$(IP) %(COMMUNITY)outputMeasurementCurrent.$(N) Float: 100 Fn")


(The 'F' flag specifies floating point data type)




From: 吴煊 <[email protected]>
Sent: Monday, June 11, 2018 4:57 AM
To: Priller, John; Priller, John
Cc: [email protected]
Subject: SNMP device support
 

Hi Priller and all,

Thanks for the excellent device support "snmp-nscl-1.0.0.1" which is used to control ISEG/MPOD modules. Everything works fine. Howerver, there is a requirement that we need 9 digits after decimal point for reading "outputMeasurementCurrent" which is 6 digits decimal by default. It can read 9 digits deciaml by using snmpget command when we update NET-SNMP to newest version net-snmp-5.8.rc3. The result is shown below

moxa@RTCOWNS126:~/app$ snmpget -v 2c -M /usr/share/snmp/mibs:/usr/local/share/snmp/mibs -m +WIENER-CRATE-MIB -c guru 192.168.1.120 outputMeasurementCurrent.u400
WIENER-CRATE-MIB::outputMeasurementCurrent.u400 = Opaque: Float: 0.000000 A
moxa@RTCOWNS126:~/app$ snmpget -Op .9 -v 2c -M /usr/share/snmp/mibs:/usr/local/share/snmp/mibs -m +WIENER-CRATE-MIB -c guru 192.168.1.120 outputMeasurementCurrent.u400
WIENER-CRATE-MIB::outputMeasurementCurrent.u400 = Opaque: Float: 0.000000088 A

The difference between the two command lines is "-Op .9" which means output precision 9 digits after decimal point. I can't find anything to set the paramenter in SNMP device support user manual. So my question is how to set paramenter "-Op .9" in snmp device support or how can I get higher precision using snmp device support?

Base verison:3.14.12.5, The record is like this:

record(ai, "$(GEO):$(SYS):$(CRATE):M$(SLOT):$(CH):Cur:Raw")
{
field(DTYP, "Snmp")
field(INP,  "@$(IP) %(COMMUNITY)outputMeasurementCurrent.$(N) Float: 100")
field(EGU,  "A")
field(PREC, "9")
field(SCAN, ".1 second")
}

Cheers,

Xuan





References:
Re: SNMP device support Priller, John

Navigate by Date:
Prev: Re: MVME3100 FPU Support on RTEMS 4.10.2 Matt Rippa
Next: Re: MVME3100 FPU Support on RTEMS 4.10.2 Sebastian Huber
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: SNMP device support Priller, John
Next: Stream device with non-standard baudrate Konstantin Kr
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 12 Jun 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·