Troubleshooting Data Retrieval Issues with read_var() Block in M340 PLC

Question:

My Schneider M340 PLC is integrated with an Energy Meter EM6400, connected via Link150 Ethernet Gateway within my PLC network. Despite using the read_var() block, I am facing issues in retrieving data into my receiving array. However, I am able to view reports in the Exchange management Table. See attached pictures for reference.

Top Replies

It appears that you are continuously enabling the red car, you might want to consider implementing logic to enable this in a cyclical manner. Additionally, have you set a timeout for your gear array? Is the activity bit animating? In other words, is your read variable attempting to read data? Also, make sure to ping the energy meter using the configured IP address. Refer to the read var help file to understand the heat array values. Remember to always consult the manual for guidance - RTM (Read The Manual).

I am applying the same approach to read data from a different energy meter, also manufactured by Schneider. However, the Ethernet Gateway is from a different manufacturer. I am successfully receiving values in the array. I have configured the timeout value to 12 in the GES T array. I can display the activity bit animation, but I have noticed that only the most significant bit is continuously changing, while the least significant bit remains at 0 without updating.

In order to optimize communication and prevent constant reading, it is important to pulse read_var regularly. Additionally, it is crucial to trigger read_var only when the activity bit is in the off-state. Differences in gateways can lead to variations in communication settings. It is recommended to check for the first activity bit alternating as an initial troubleshooting step. Are you using the same gest_variables for both or different variables? This is key for effective communication when using read_var. If you have different gest variables, you can read at the same time. However, if you are using the same gest variables, you can only read from one meter at a time and will need to alternate read var blocks accordingly. Gesture parameter [2] contains operation and communication error codes, with the LSB byte having a hex value of 16#C, indicating a problem.

Hey there! Can you recall how you resolved a problem I'm currently facing? I'm struggling with not receiving data in arrays and there are no error messages popping up.

One key variable to consider in Gest Management is the timeout setting, which must not be set to 0 in order for the block to function properly. If you are unsure of the specific variable, you can easily locate it by searching through the help documentation.

From your description and the screenshots you've shared, it seems like you might have an issue with configuration settings or addressing. Ensure that the device IP and unit ID in your read_var() block match with those of the EM6400. Additionally, check your start address and quantity of registers. It's also worth noting that the EM6400 energy meter uses Modbus protocol, so double-check your Modbus function codes and make sure they're appropriate for the parameters you need from the EM6400. I hope this helps.

It sounds like you’re on the right track with the setup, especially since you can see the reports in the Exchange management table. One thing to double-check is whether the data type and addressing in the read_var() block match what the EM6400 is outputting; sometimes mismatches there can cause issues with data retrieval. Also, ensure that the communication settings for the Link150 gateway are properly configured—any discrepancies could affect data flow to your PLC. Have you considered testing with different variable types or trying a simpler read operation to isolate the problem?

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.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. Question: How can I troubleshoot data retrieval issues with the read_var() block in my M340 PLC?

Answer: Answer: To troubleshoot data retrieval issues with the read_var() block, you can check the configuration of the read_var() function block, ensure proper connectivity between the M340 PLC and the Energy Meter EM6400 via the Link150 Ethernet Gateway, and verify the data exchange settings.

FAQ: 2. Question: What could be causing the issues with retrieving data into the receiving array despite using the read_var() block?

Answer: Answer: Possible reasons for issues with data retrieval could include incorrect data mapping or addressing in the read_var() block, communication errors between the devices, network configuration problems, or data format mismatches.

FAQ: 3. Question: How can I ensure that the data from the Energy Meter EM6400 is being successfully retrieved into the receiving array?

Answer: Answer: You can verify the data retrieval process by checking for error codes or status messages provided by the read_var() block, monitoring the data exchange in the Exchange management Table, and confirming that the received data matches the expected format and content.

FAQ: 4. Question: What steps should I take if I can view reports in the Exchange management Table but still face issues with data retrieval using the read_var() block?

Answer: Answer: If you can view reports in the Exchange management Table but encounter issues with data retrieval, consider checking the data mapping settings, ensuring proper synchronization between

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  â†’