Daniel_EWW Posted July 16, 2020 Report Share Posted July 16, 2020 For the communication with Siemens PLC’s we use an Anybus device. In the version 1.26 everything works fine. With the 1.29 version, the NumOfClients is increasing to 165 and after approx. half an hour no more data is exchanged with the Anybus device. Any ideas for a work around? Is this a Modbus bug in the 1.29 version? 1 Link to comment Share on other sites More sharing options...
Daniel_EWW Posted July 16, 2020 Author Report Share Posted July 16, 2020 Below my dirty work around. The communication is now working for 2 hours. If the "NumOfClients" is grater than 150 the Modbus Slave address is set to 2 for one PLC cycle. This triggers a reset of the "NumOfClients". Link to comment Share on other sites More sharing options...
Daniel_EWW Posted July 17, 2020 Author Report Share Posted July 17, 2020 Also the Modbus TCP Slave is not working properly in V1.29. We changed back to V1.26. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 17, 2020 MVP 2023 Report Share Posted July 17, 2020 @Saragani @AlexUT You may want to look at this. Joe T. Link to comment Share on other sites More sharing options...
Daniel_EWW Posted July 24, 2020 Author Report Share Posted July 24, 2020 Is it possible to build a RTU Slave ladder program (parse and response to incoming msg. from the master) with the advanced modbus function blocks? (Couldn't find an example in the UniLogic examples.) @Saragani @AlexUT @Joe Tauser Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 24, 2020 MVP 2023 Report Share Posted July 24, 2020 If you haven't already, go to the UniLogic Help tab and click Update Help File. Then search for "Advanced Modbus". Give us a more specific example of what you're trying to do. Joe T. Link to comment Share on other sites More sharing options...
Daniel_EWW Posted July 25, 2020 Author Report Share Posted July 25, 2020 Joe, thanks for your answer. I want to replace the modbus slave configuration with a ladder logic listening on the RS485 CPU interface. Enclosed the picture with slave configuration and a beginning of ladder logic (cannot work this way but hopefully points out what to do). Joe, just out of curiosity. Are you a Unitronics employee? I’m not happy with the 1.29.111 version. Often get the “HMI overload message”. Sometimes after a download, the screen stays black (only power up can resolve it). Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 25, 2020 MVP 2023 Report Share Posted July 25, 2020 So is the Master going to send a straight ASCII string, like "11,03,6B" or will it be "1103006B"? What about the number of operands requested? I think you need to add that unless it's always 1. Understand the the UniStream is the Master on the RS485 port for these blocks. If you're trying to change the personality of the UniStream as a Modbus Slave device, it can not be done. The Slave ID of the UniStream is fixed in the project. If you want to have the UniStream act as a "Multi-Slave", you will have to continue along the path you show above and roll your own Modbus Decoder / Responder. So this may not be what you're asking about, but I looked into it anyway as I wasn't familiar with these blocks and I'm sure others on the forum will want to know about them. These are dynamically allocated Modbus configurators and will allow Modbus reads and writes to be determined by tag values. The Modbus tables are easy to use, but sometimes you need more power. I dug into the Modbus Advanced blocks to figure out how to use the Read Parser and the Read Builder - these are pretty new features which is why they're not in the examples. They look fairly straightforward - I'll build a project to test them. An initial observation - the Modbus Request Struct for the Builder block is all in decimal. Although I'm not seeing where the IP address is if TCP is specified. I'll have to ask about that. I'm still running UniLogic 1.28.34. I'm not a Unitronics employee, but I've been a distributor in the US since 2000 and also do system integration. In my past life I was an engineer doing PLC programming for the Modicon distributor, so between that and Unitronics I know a bit about how Modbus works. We did Allen Bradley as well, and I still do AB projects if the user wants to pony up the $$. Joe T. Link to comment Share on other sites More sharing options...
Daniel_EWW Posted July 27, 2020 Author Report Share Posted July 27, 2020 Joe, thanks for your time to give a comment to my problems. Enclosed is a pdf with my experimental Modbus slave solution for our job. Took me several hours playing around. The following page http://www.simplymodbus.ca and the program qModMaster helped me to do this. Why do we need this: In my second post of this thread, I changed the Modbus Slave Address to reset the “NumOfClients”. This works for about 6 – 10 hours. Then suddenly the Status of the Modbus Set Functions changes to -1 and the communication is dead again. I hope that the new solution works… I will post an update in a few days. Quote Understand the the UniStream is the Master on the RS485 port for these blocks. If you're trying to change the personality of the UniStream as a Modbus Slave device, it can not be done. The Slave ID of the UniStream is fixed in the project. I'm not sure if I understand your limitation correctly. I understand that in Modbus RTU only one master is allowed due to the hardware pegel of the signals. But does it matter if I use the RS485 CPU COM Port or the UAC-02RSC_0 RS485 port? Modbus_Slave.pdf Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 28, 2020 MVP 2023 Report Share Posted July 28, 2020 I've played with the Simply Modbus programs. They are very handy indeed. My personal Modbus tool is from these guys - https://www.calta.com/mdbus.htm. It does everything in one package. It is not free but it's not super-expensive. While you're learning about how Modbus works be sure to check out the original Modicon specification: https://modbus.org/docs/PI_MBUS_300.pdf . It's a bit dry but it's an excellent reference on how the Modbus frames are structured. No, it doesn't matter which RS485 port you use for what you're doing, but if you're using the CPU port for your manual decoder set the config for Tx/Rx so you can access it as COM struct "RS485 CPU COM Port". I was referring to the UniStream being the Master or Slave on the CPU RS485 port only if you are utilizing the built-in Modbus protocol tables- I am curious why it works for a few hours and then locks up. It may help if you clear your buffers out after you use them. Buffer tags are kind of the Wild West of UniStream memory - it's raw data and you can do whatever you want with it. I don't know how old you are, but back in the day Windows NT 3.51 was famous for "memory leaking" and grinding to a crawl. There were little utilities you could get that would periodically purge the RAM. Joe T. Link to comment Share on other sites More sharing options...
Ness Posted July 29, 2020 Report Share Posted July 29, 2020 We're having the exact same issue as Daniel_EWW. 1.28 works fine. Upgrade to 1.29 and the Modbus serial NumOfClients starts to grow, hits 165 and dies. This is with a single Modbus device as a master and the PLC is the slave. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 29, 2020 MVP 2023 Report Share Posted July 29, 2020 Sounds like we may have a bug. @Ness, @Daniel_EWW Please paste a link to this post in an email to official Unitronics support - support@unitronics.com. Let us know what they have to say. Joe T. Link to comment Share on other sites More sharing options...
Ness Posted July 30, 2020 Report Share Posted July 30, 2020 Support pointed me to a software build 1.29.138 which fixed the issue! Link to comment Share on other sites More sharing options...
Daniel_EWW Posted August 3, 2020 Author Report Share Posted August 3, 2020 Hi Ness, good to know that I'm not the only one with this issue. Did Unitronics shared a link to the 1.29.138 built? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now