From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

Help with SNMP

Go to solution

I found a SNMP vi library online that someone wrote and I am struggling to get it to work. I believe that I am using them correctly because I can get some OIDs to work and others won't return anything.

OID . - works fine. It returns the same OID, datatype, and then the value.
OID . - doesn't work, it returns a different OID and nothing in the datatype or value.

Has anyone used this library before?  All I need to do is get one value from a device. Any ideas?

Download All
0 Kudos
Message 1 of 6

I couldn't look at your temp test VI (I have LV 8.6), but I downloaded the llb from the LAVA forums and noticed that the SNMP Get function has two error outputs. The standard LabVIEW Error Out indicates if a UDP error occured. Try looking at the error-status, error-string and error-index output values for this function.


There may be a problem interpreting the SNMP response for your specific OID ( that would not be present in the LabVIEW Error Out cluster. You would see this only in the SNMP Get front panel.


If you google, the first link (today anyway Smiley Tongue) indicates that the MIB/device may not be strictly compliant. If the device returns a value that is inconsistent ( a string for an integer value ) the library may be reporting an error (see above).


Since the RFC-1213 required Object IDs work but the vendor specific objects don't, the best bet is to contact the supplier of the equipment and determine if you are requesting the correct object or maybe need a software update on the node you are querying.

Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 6

Thanks for the response.  I looked at those errors and they seem okay.  I looked deeper into those library vis but I don't know a whole lot about SNMP so it is hard to diagnose.  I talked with the manufacturer of my device but all they said was it is probably a problem somewhere in labview.  I will keep plugging away at it.  Any other ideas?

0 Kudos
Message 3 of 6

I would suggest trying the 'SNMP MIB' example and a starting OID of, leave the end OID blank.



Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 4 of 6

I tried the walk with no luck. I believe the problem lies somewhere in the SNMP Encode or the SNMP Build  I don't think that it is encoding the 21796 part of the OID correctly.  If you plug the 21796 as the SubID it will output 24 in the byte array.  I am not sure what the correct output for that number should be.  Can someone help me out here?  Thanks

Download All
0 Kudos
Message 5 of 6
Accepted by topic author secr1973

The original poster contacted me directly and I gave him an updated version of the library that resolved his problems. To be honest I am not sure what updates are in the latest version of the library since the version he got was quite old. Anyway, here is the most recent version for anyone else that may need SNMP.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 6