6/12/2023 8:09 AM | |
Joined: 3/24/2019 Last visit: 2/2/2024 Posts: 5 Rating:
|
Hello, forum members , I use 1200 series PLC, I have it connected Modbus RTU CB 1241 (RS485) .I have set up the master-slave connection .I normally receive signals from slaves Baud rate: 9600 stop bit 1 But I have a problem when the slave is turned off or the power supply is interrupted, the module does not lose connection with the slave And the data that I have written in the data block is not zeroed and continues to display the variables . When the system moves from start to stop, after this event it returns to the correct position and the deviations are reset to zero. Has anyone had the same problem to share with me? ------------------------------------------------------------------------------------------ |
Last edited by: wiqara at: 06/12/2023 08:23:30Last edited by: The Helping Hand at: 06/12/2023 08:29:51New subject after splitting |
|
7/19/2024 7:56 AM | |
Joined: 4/8/2024 Last visit: 8/18/2024 Posts: 1 Rating:
|
Hello, I'm experiencing same problem as described in this topic... S7-1200 + CB 1241 9600 / 8 / N / 1 When one or more of the slave is off, the values received from the slaves don't go to 0...remains the previous values... Could you give me a hint how to solve the problem? Thanks, AttachmentRTU_MODBUS[FB1].pdf (137 Downloads) |
7/19/2024 8:35 AM | |
Joined: 3/30/2020 Last visit: 9/9/2024 Posts: 4728 Rating:
|
The ERROR pin of the MB_MASTER block will tell you if there is a problem. The STATUS pin tells you what that problem is. The code can be constructed to make the values zero if you have an error (as per your requirement). Before getting to that point -- does your program even work? Calling so many instances of the same MB_MASTER block may cause problems. These days I use the wrapper (library) provided here: Extended modbus library for Siemens PLC's. It is a 3rd party library, so use is on your own risk. |
Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
This contribution was helpful to
1 thankful Users |
Follow us on