tim.snelling Posted February 14, 2022 Report Share Posted February 14, 2022 Hi, I need to have several UniStream PLC's (Modbus Master TCP), that connect to a Modbus TCP Slave. The Slave provides Ambient Temperature, so reading the Holding Register from the Modbus TCP slave every 30 minutes or so, is adequate. In UniLogic ladder logic, I set the Active Periodic bit "On" with a 30 minute timer, then it reads the holding register. After a successful update, I then turn "Off" the Active Periodic bit, but the PLC's socket connection does not close, and the Status of my Modbus Master remains at "1 = Good, No Errors" for the entire time in-between the 30 minute read from the Modbus Slave. Can someone tell me how to close the Modbus TCP socket connection on port 502, using the UniLogic ladder logic. Thanks, Tim S. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted February 15, 2022 MVP 2022 Report Share Posted February 15, 2022 I'd try the process using a positive transition for your controlling bit. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted February 17, 2022 MVP 2022 Report Share Posted February 17, 2022 I don't think the Modbus table ever actually closes its connection, as you are observing. I rooted through all the system bits and didn't see anything useful. You may have to resort to doing your Modbus communications the hard way as in how it's done in Vision. I've gone to using the Advanced Modbus Functions for my communications, as every aspect can be specified and multiple parallel sessions can be had. See this post - Joe T. Quote Link to comment Share on other sites More sharing options...
Gabriel Franco Posted February 17, 2022 Report Share Posted February 17, 2022 I would use one UniStream as a master, reading from your temperature slave and then writing its value to others Unistream acting as slave as well. Quote Link to comment Share on other sites More sharing options...
tim.snelling Posted February 28, 2022 Author Report Share Posted February 28, 2022 Joe T., Thank you for the pointer. I had to move on to other projects, and I'm going to be getting back to this project soon. It appears that the Advanced Modbus Functions will give me what I need. Gabriel, Your idea could work, however these PLC's will go into many sites, with a different number of PLC's, and possibly a different range of IP's, so setup would be more difficult. But if I can't get the socket to close using the Advanced Modbus Functions, then I may be forced to do something like you suggested. Thanks guys, Tim S. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.