Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-11-12 05:08 AM
Hi everyone ,
I'm new to Schneider PLC and am working on setting up communication between an M340 PLC and a third-party Modbus device using the READ_VAR block. The block is triggered by the system clock bit %S6. The configuration generally works well, and I can read data under normal conditions. However, when there’s a break in communication—such as if the PLC or Modbus device is powered off or the communication cable is disconnected—the communication freezes and won’t automatically restart. To re-establish communication, I either have to set the PLC to STOP and then RUN mode or redownload the program. Upon checking the diagnostic values, I noticed that the transaction ID remains unchanged, and all other parameters are set to 0. Any insights or advice from experts would be greatly appreciated
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-11-13 08:44 PM
Hi,
It sounds like you're encountering a common issue with the READ_VAR block in the M340 PLC when communication with the Modbus device is interrupted. Some insights and potential solutions to help you troubleshoot and resolve the freezing issue:
1) Timeout Settings: Ensure that you have set a proper timeout value in the GEST structure of the READ_VAR block. If the timeout is set to zero, the block will never timeout, which can lead to the communication freezing when a disconnection occurs. A typical timeout value is around 100-500 ms.
2) Resetting the GEST Variable: When communication freezes, some users have found success by manually resetting the GEST variable associated with the READ_VAR block. This can sometimes reinitialize the communication without needing to stop and restart the PLC.
3) Check Connection Limits: The M340 PLC has a limit on the number of simultaneous connections (usually 16). If this limit is reached, it may cause issues with new connections. You can monitor the number of open connections through the NOE card debug window.
There are others who are experiencing the same problem as you.
For more details about this, you can click this link:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-11-14 03:05 AM
Dear Michael ,
Thank you for the quick response and helpful guidance. I hope the suggested solutions will resolve the issues.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.