04-13-2010 07:32 AM
Error 1 occurred at UDP Write in SNMP Get Request.vi->Get snmp Item(s).vi->Untitled 1 Possible reason(s): LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @. ========================= NI-488: Command requires GPIB Controller to be Controller-In-Charge.
04-13-2010 07:59 AM
04-13-2010 08:13 AM
04-15-2010 04:38 AM
Yes Mark Yedinak
i am using your given library
please guide me for TRAP function and give some guidance on this
04-15-2010 09:45 AM
Prashant,
Here is a very basic Trap Monitor. The Trap VI is used to monitor the UDP port for SNMP traps. It will decode the data and return the parameters of a trap. (I should have used a cluster and if I update this library I probably will do that.) Do you have a specific question regarding the use of this VI?
04-17-2010 12:39 AM
thanks Mark
but i have some doubt
i have to fetch UPS data using SNMP and also have to fetch Trap
UPS has a particular IP address for communication.
but in your Trap VI there is no option for IP address.
so how can i do that. IP address is required?
04-17-2010 04:11 AM
04-18-2010 07:33 PM
SNMP Traps are asynchronous events that are sent from an agent to either a specified IP address or are sent as broadcast packets. Traps are sent to UDP port 162. The example I included above creates a listener on port 162 and will receive all traps that are either broadcast or sent to the IP address of the PC. The example decodes that trap message. You will have to add code to filter out any traps that you are not interested in. The MIB definition of the UPS should specifiy which OIDs it uses for its traps. The MIB should also define what data is included in the traps.
Querying the device itself will require you to use the get request VIs from the library. You will need to know the IP address of the device you want to query and what OIDs you would like to retrieve. Again, the MIB for the devices you are trying to query should provide you with the deatils on the data they provide.
While these VIs could use some enhancements they all work quite well. I have been using them for at least 10 years.
What UPS are you trying to communicate with? Do you have the MIB for the device? If you post the MIB and let me know what data you are interested in I could tell you which OIDs you will need to use.
04-19-2010 12:17 AM
UPS NAME:--> Smart-UPS RT 2000 RM XL
i need all events
and bad msg.
here is the attachment of that particular MIB. extension change MIB to xls.pls after downloading this file change it into MIB.
Can i get all traps including generic Trap.
Can u send me updated trap vi.
also can u tell me that how can i import the MIB file .
there is any Particular vi for this operation.
04-19-2010 12:55 AM
Prashant S wrote:UPS NAME:--> Smart-UPS RT 2000 RM XL
i need all eventsand bad msg.
here is the attachment of that particular MIB. extension change MIB to xls.pls after downloading this file change it into MIB.
Can i get all traps including generic Trap.
Can u send me updated trap vi.also can u tell me that how can i import the MIB file .
there is any Particular vi for this operation.
Prashan! You do realize that Mark has put up his SNMP library up for free use? If this library was part of the Internet Toolkit or some other NI Toolkit it would not be free, nowadays most likely password protected at least on library level, and you could at best put in an feature request and hope it is added in a few years.
If I was Mark I would feel your request to him to change it to suit your specific requirements all for free to be rather rude. Read the specs, understand how network communication works and make the few modifications to his library yourself! And then post the improvements so that others can benefit too! Once you have done that you will be able to make even more changes and also have improved your knowledge to be an even better engineer.