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 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
<== Date ==> <== Thread ==>

Subject: Re: Control device via epics-snmp
From: "Priller, John via Tech-talk" <tech-talk at aps.anl.gov>
To: White <18019393607 at 163.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 20 Mar 2024 14:36:40 +0000

You seem to be missing the last item on the OUT line, which is the SNMP format character to use when writing the value to the device.  That would be an 'i' for an integer or an 'F' for a float (yes, they use different case, no idea why).


So:


field(OUT,"@$(HOST) private $(MIB)::pduOutletSwitchedControlCommand.1.1  ( 100 i")

or if you wanted to use native format rather than strings, add the 'n' flag:

field(OUT,"@$(HOST) private $(MIB)::pduOutletSwitchedControlCommand.1.1  ( 100 in")

I'm assuming you're using my SNMP driver, which may be a mistake on my part because there are two other older ones out there.  But the documentation for mine is here:



From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of White via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, March 20, 2024 4:20 AM
To: tech-talk at aps.anl.gov
Subject: Control device via epics-snmp
 
[EXTERNAL] This email originated from outside of FRIB

Hi

I'm trying to control the device using the SNMP protocol. But I can caget to the value, when I caput, the value does not change.

 

the db file is as follows:

 

record(ao,"$(DEV):Switch1")

{

    field(DESC,"SNMP channel")

    field(DTYP,"Snmp")

    field(SCAN,"Passive")

    #field(PREC,"3")

    field(OUT,"@$(HOST) private $(MIB)::pduOutletSwitchedControlCommand.1.1  ( 100")

}

 

The mib file is as follows:

 

pduOutletSwitchedControlCommand OBJECT-TYPE

  -- FROM       ENLOGIC-PDU-MIB

  SYNTAX        INTEGER {immediateOff(1), immediateOn(2), delayedOff(3), delayedOn(4), immediateReboot(5), delayedReboot(6), outletUnknown(7)}

  MAX-ACCESS    read-write

  STATUS        current

  DESCRIPTION   "Getting this variable will return the outlet state.

                If the outlet is on, the immediateOn (2)

                value will be returned. If the outlet is off,

                the immediateOff (1) value will be returned. "

::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) enlogic(38446) pdu(1) pduOutlet(5) pduOutletSwitchedControlTable(5) pduOutletSwitchedControlEntry(1) pduOutletSwitchedControlCommand(4) 1 2 }

 

Is there an error somewhere in the db file?

Thanks

References:
Control device via epics-snmp White via Tech-talk

Navigate by Date:
Prev: RE: mcaAIM and nmcDemo not finding AIM 556 on new linux install Mark Rivers via Tech-talk
Next: PVXS IOC Philosophy Dave Bracey 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
Navigate by Thread:
Prev: Control device via epics-snmp White via Tech-talk
Next: PVXS IOC Philosophy Dave Bracey 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
ANJ, 20 Mar 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·