Troubleshooting issue with Siemens PLC S7-1200 and switch XC-208 SNMP integration

Question:

Hello, I am currently working with a PLC S7-1200 and switch XC-208 and attempting to integrate the SNMP library provided by SIOS. I am encountering an issue where there is no activity despite expecting there to be. The "get next" function always returns false, there are no Object Identifiers (OIDs) present, and the status information indicates either no active job or a follow-up call of the command resulting in a time-out. I would greatly appreciate any assistance you can provide. Thank you for your support!

Top Replies

The absence of a response typically indicates that the request has been sent to the target but not received. From what I can gather from the code, it seems that GetNext function only becomes active after a successful initial read, which has not occurred. While it's possible that certain tasks are done behind the scenes, it's important to make sure that the OID and community string are properly configured. Although I noticed these being mentioned in your initial screenshot, they were not assigned. The default community string is likely set to public or private, but the default OID may not be suitable for your needs. Additionally, common issues such as incorrect IP addresses, invalid network paths for the PLC, SNMP being disabled on the device, etc. could also be causing the problem. It's worth noting that the library may only support v1/v2 of the SNMP protocol, whereas the switches may default to using V3 for enhanced security.

When mk42 mentioned that the request was likely sent to the target but no response was received, it indicates that the GetNext function is not active as it hasn't successfully read the first time. It's essential to ensure that the OID and community string are properly set, as seen in the initial screenshot provided. The community string is often set to default values like "public" or "private." Other potential issues could include incorrect IP address, invalid network path, disabled SNMP on the device, or compatibility with SNMP version 1 or 2. Thank you for pointing out the error in not setting the OID and community string. As a beginner in PLC, I may not be articulating my questions accurately. I hope to use this library to monitor and control network traffic passing through the switch. Could you provide insights on interpreting the output numbers for this purpose?

The following example showcases the usage of SNMP blocks in an app, particularly with a wireless card. In order to retrieve specific data from the SNMP server, you must be familiar with the OID (Object Identifier) associated with the information you are seeking. One approach to obtaining the OID is by using a MIB Browser. While there are free options like SNMPB available, they may not be the most user-friendly for beginners as they are typically hobbyist projects. Alternatively, some companies offer paid MIB Browser solutions with the possibility of free trials. These tools allow you to load MIBs and navigate the OID tree or perform a scan to explore all the OIDs associated with a device. A MIB (Management Information Base) file informs a MIB Browser about the available OIDs for browsing. Various public MIBs pertain to networking standards while a switch's private MIB, containing additional data provided by Siemens, can be downloaded from the switch's website. If you wish to modify configuration details, you can download the startup configuration from the switch to analyze the config data in OID format. OIDs can be either simple variables (such as INT or String) or entire tables with multiple instances of an OID. For instance, each device in a switch's ARP table may have a distinct instance, with each instance storing relevant data for that particular device (e.g., something.1.1 for the IP of the first device, something.1.2 for the IP of the second device, something.2.1 for the MAC of the first device, etc.). You can navigate through the table sequentially or request specific information based on known instance numbers. Download SnmpB for free - it is an SNMP MIB browser developed in QT that supports SNMPv1, SNMPv2c, and SNMPv3.

mk42 mentioned that the app example below demonstrates a way to utilize SNMP blocks using a wireless card. In order to make requests, it is essential to know the OID, which is a numerical string linking to data in the SNMP server. A MIB Browser is a helpful tool to obtain the OID. Though there is a free option like SNMPB, it may not be the most user-friendly for beginners. Paid alternatives with free trials are available from various companies. By loading MIBs and browsing the tree or using a walk to scan through all OIDs of a device, you can access the information you need. A MIB is a file that informs a MIB Browser about existing OIDs for browsing. Numerous public MIBs are associated with networking standards. Additionally, private MIB data added by Siemens can be downloaded from the switch's webpage. Some OIDs are simple variables, while others contain multiple instances of an OID within a table. For example, each device in the ARP table of a switch can have a different instance holding specific data. Regarding a specific issue with an OID ("sysname not set" response and error code 8502), the error is specified as a SNMP error received from the partner. While the only reference to error 8502 is for a G120X converter, further investigation is needed to determine if it applies to the switch and potential troubleshooting steps. Assistance is requested in resolving this problem and confirming the correct usage of SNMP for PROFINET communication and diagnostics with the controller.

Lukas1 expressed gratitude for the advice provided but mentioned the difficulty in downloading SnmpB on school devices. Is it the school's policy not to allow software installations? SnmpB is a cost-free, open-source tool that could be a solution in this case. Lukas1 encountered an issue where only a predefined OID (1.3.6.1.2.1.1.5.0) from TIA could be utilized, resulting in a "sysname not set" response. Other OID attempts led to a status error 8502, which is not documented in the library. This error is specified as 16#85xx: SNMP error received from partner, with the SNMP error code indicated in the lower byte. Research suggested that SNMP error code 02 translates to "Bad OID". Finding the correct OID is crucial in SNMP operations, similar to selecting a tag when communicating with a PLC. Lukas1 sought confirmation on using SNMP for PROFINET communication and controller diagnostics. To resolve the issue, it is essential to clarify the specific problem at hand. Can network data be retrieved from the switch using SNMP? Yes. Does the PLC offer diagnostic capabilities? Possibly. By specifying the goal, assistance can be provided in accessing the desired information through the PLC's system instructions.

Hey there! It sounds like you're having a frustrating time with the SNMP integration. Have you checked to ensure that your device is correctly configured for network communication and that the SNMP settings match between the PLC and the switch? Sometimes the SNMP version mismatches or firewall settings can lead to no OIDs being detected. Additionally, consider verifying if the SNMP service is enabled on the device itself. It might also help to do a simple SNMP walk command using a tool like SnmpB or SolarWinds to see if you can retrieve any data. Good luck, and I hope you get it sorted out soon!

It sounds like you're facing a tricky situation with the SNMP integration. Have you double-checked the network settings, especially the IP configuration of the PLC and the switch? Sometimes a simple mismatch can cause no communication. Also, ensure that the SNMP version you’re using is compatible with your configuration, as different versions have different requirements for authentication and data access. If everything looks correct, consider using a packet sniffer like Wireshark to see if the requests are actually being sent and if any responses are coming back. Good luck, and I hope you get it working soon!

It sounds like you're facing a frustrating issue with the SNMP integration. Have you double-checked your OID setup and ensured that the SNMP agent on your PLC is configured correctly to respond to requests? Sometimes, if the community strings don’t match or if the SNMP version settings are off, it can lead to these kinds of time-outs and errors. Also, make sure that your network settings allow communication between the PLC and the SNMP manager; firewall settings could be blocking the traffic. It might also help to run a network sniffer to see if the requests are hitting the PLC at all. Good luck!

More Replies β†’

Streamline Your Asset Management
See How Oxmaint Works!!

βœ…   Work Order Management

βœ…   Asset Tracking

βœ…   Preventive Maintenance

βœ…   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

You must be a registered user to add a comment. If you've already registered,
sign in. Otherwise, register and sign in.

Frequently Asked Questions (FAQ)

FAQ: 1. What could be causing the issue of the "get next" function returning false during SNMP integration with Siemens PLC S7-1200 and switch XC-208?

Answer: - This issue could be due to several reasons such as incorrect configuration of SNMP parameters, mismatched data types, or communication settings. It is advisable to double-check the configuration and ensure compatibility between the devices.

FAQ: 2. How can I troubleshoot the lack of Object Identifiers (OIDs) during SNMP integration with Siemens PLC S7-1200 and switch XC-208?

Answer: - If there are no OID present, it is essential to verify the SNMP library version being used, confirm the availability of necessary MIB files for the devices, and check if the OID values are properly defined in the configuration settings.

FAQ: 3. What actions can be taken to resolve the status information indicating no active job or resulting in a time-out when integrating SNMP with Siemens PLC S7-1200 and switch XC-208?

Answer: - To address this issue, ensure that the SNMP agent is running correctly, check for any network connectivity problems, review timeout settings, and inspect the SNMP request/response flow for any anomalies. Adjusting the parameters and retesting the integration may help in resolving the status information problems.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  β†’