MVP 2022 Flex727 Posted April 5, 2014 MVP 2022 Report Share Posted April 5, 2014 I am fairly experienced with Unitronics PLCs and have done quite a few projects requiring communications with no major problems encountered until now. On this project I am sending data from one V570 PLC to another using MODBUS IP over Ethernet. My need is to send 160 registers (MIs) using R.H.R #3. I've found that I cannot send more than 125 registers without encountering status errors 4, 5, & 6. Is this to be expected? Are there any tips on how to handle this? If I were to break it down to two separate reads, what would be the best procedure - should there be a delay between the two reads? Thanks. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted April 6, 2014 MVP 2022 Report Share Posted April 6, 2014 The 125 register limit is defined in the Modbus protocol. I'd do the two reads you suggested with a short delay (0.1 sec) between them. Joe T. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted April 6, 2014 Author MVP 2022 Report Share Posted April 6, 2014 Thanks, Joe. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted April 6, 2014 Author MVP 2022 Report Share Posted April 6, 2014 As a followup, I need to say that I really needed to transfer much more than 160 registers. My intent is to move 96 user-entered names of 10 characters each stored in 480 MIs from one PLC to another so that the customer doesn't have to enter them twice (they were in 3 vectors of 160 MIs, hence my need to read 160 in my original question). These names might change from time-to-time so I wanted a pushbutton to grab the names off the other PLC when needed. I broke the read into 5 pieces and tried executing them all at once without any delay and, surprisingly, it worked perfectly. The PB SETs 5 MBs. Each read is the standard line of code where the MB is N.O. and the power flows through the usual check for connected Socket and no other comm in progress, then a RESET of the MB at the end. Even though every single read is initiated in the same PLC cycle, they all execute properly. I may add the delay in anyway just for safety, but apparently Unitronics has some well-written MODBUS function code. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted April 7, 2014 MVP 2022 Report Share Posted April 7, 2014 If it works without the delay then I'd smile and leave it alone. I've experienced problems with other functions that the delay fixed, but empirical data is the best data. Joe T. 1 Quote Link to comment Share on other sites More sharing options...
Cara Bereck Levy Posted April 17, 2014 Report Share Posted April 17, 2014 You could also use the FB Protocol TCP/IP FB Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted April 17, 2014 Author MVP 2022 Report Share Posted April 17, 2014 I'm not sure I follow how the TCP/IP FB applies to my situation. I've never used it before and probably don't understand it properly. I'm always looking to learn something new - can you elaborate, Cara? Quote Link to comment Share on other sites More sharing options...
HigHTech Posted April 21, 2014 Report Share Posted April 21, 2014 I am fairly experienced with Unitronics PLCs and have done quite a few projects requiring communications with no major problems encountered until now. On this project I am sending data from one V570 PLC to another using MODBUS IP over Ethernet. My need is to send 160 registers (MIs) using R.H.R #3. I've found that I cannot send more than 125 registers without encountering status errors 4, 5, & 6. Is this to be expected? Are there any tips on how to handle this? If I were to break it down to two separate reads, what would be the best procedure - should there be a delay between the two reads? Thanks. Hi Flex: I understand you are going to send MIs between 2 V570 (or Unitronics PLC´s). You can send the 160 registers in one action (but only if the 2 PLC´S are Unitronics). You need to use the Read/Write Mixed Data (you can send a max of 240 MI´s) in a single action command. I only use the Read/Write Mixed Data if working with Unitronics PLC´s. If you need to communicate with 3rd party then use the standard commands. 2 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted April 21, 2014 Author MVP 2022 Report Share Posted April 21, 2014 Thank you, HigHTech! I learned something very useful from you today! 1 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted September 24, 2014 Author MVP 2022 Report Share Posted September 24, 2014 I tried using the Read/Write Mixed Data FB today and it works well. One issue I came across was an offset when reading the slave registers. I was trying to read 200 MIs (MI 3700 - MI 3899) but when I entered MI 3700 into the FB, the data returned starts at MI 3701. Obviously it is easy to just start reading at 3699 instead and that worked properly, but should that offset be expected? There was no offset when I wrote MIs, just on the read. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 8, 2014 Author MVP 2022 Report Share Posted December 8, 2014 I'm going to bump this since I'm working on another project where I'd like to use the Read/Write Mixed Data FB. I'm just a bit concerned about that offset on the MI read, but not on the write. Is there just an inconsistency in the underlying code for this FB or am I doing something wrong, or what? Quote Link to comment Share on other sites More sharing options...
Cara Bereck Levy Posted December 18, 2014 Report Share Posted December 18, 2014 Sorry for the lag, Flex! Will get this checked out. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 18, 2014 Author MVP 2022 Report Share Posted December 18, 2014 Thanks, Cara. I did it a bit differently this time. I truly have a mix of MIs & MBs and a mix of reads and writes and don't see the offset this time. Before, I think I was just reading a single block of MIs. Also, I'm now using Visilogic 9.7.24, whereas before I was using 9.4.0. I'll have to revisit my previous project to look for other differences. I'll say this, that R/W Mixed Data FB is mighty handy for what I do. Quote Link to comment Share on other sites More sharing options...
Eyal Koren Posted December 23, 2014 Report Share Posted December 23, 2014 I tried using the Read/Write Mixed Data FB today and it works well. One issue I came across was an offset when reading the slave registers. I was trying to read 200 MIs (MI 3700 - MI 3899) but when I entered MI 3700 into the FB, the data returned starts at MI 3701. Obviously it is easy to just start reading at 3699 instead and that worked properly, but should that offset be expected? There was no offset when I wrote MIs, just on the read. Hi Flex, I was just testing the Modbus IP R/W Mixed Data FB and I didn't encounter the issue you reported. Can you please post your application and mention the PLC's you are working with? 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.