tim.snelling Posted February 4, 2022 Report Share Posted February 4, 2022 I need to read 122 holding registers from a modbus slave in UniLogic. But there appears to be some crazy low limit of reading only 64 holding registers. I must be missing something, or doing something wrong. Any thoughts? Thanks, Tim S. Link to comment Share on other sites More sharing options...
tim.snelling Posted February 4, 2022 Author Report Share Posted February 4, 2022 Never mind, I'm blind 😒. I now see the Read Multiple Registers tab. TGIF Tim S. Link to comment Share on other sites More sharing options...
tim.snelling Posted February 4, 2022 Author Report Share Posted February 4, 2022 I'm back to being confused, the Write/Read Multiple Registers tab, apparently does exactly that. It Writes and then Reads the registers. I only need to Read. So how do i Read 122 holding registers, without exceeding the limit of 64 operations? Tim S. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted February 5, 2022 MVP 2023 Report Share Posted February 5, 2022 You're confusing the word "operations" with the official Modbus number of registers that can be done in a transaction (125). The way you have it you are reading one register at a time. This is a UniStream "operation". Each operation stands alone. And it's probably taking forever. Make an array of 122 elements and do one operation. I know this is not explained well anywhere, but the UniStream will translate the target and fill the array. If you look in the Help tab "Index" under MODBUS and watch the Modbus video this is mentioned at 9:04. I obviously had to go look it up to find this, and it was kind of obscure. Just specify the array name as the tag. It asks for an element, but you can use the backspace key and choose the whole array. Sorry you had to do all that typing. Joe T. P. S. - For some really exciting reading, take a look at the official Modbus specification- https://www.modbus.org/docs/PI_MBUS_300.pdf You'll see on page 28 that Modbus command (3) is "Read Holding Registers". As in plural. It also talks about the 125 register limit. The reference to 984-nn refers to the old Modicon 984 family of controllers. Your device may or may not support 125 registers per transfer, but it most probably does. Link to comment Share on other sites More sharing options...
tim.snelling Posted February 5, 2022 Author Report Share Posted February 5, 2022 Hi Joe, thanks for the help. I do have a full understanding of Modbus. I'm just new at UniLogic and UniStream. I simply wasn't able to find any method for a Multi Register read. FYI; I wasn't confused. My wording was the exact wording in the Error Description. I have no doubt your method works, but after all that typing... what a pain. I did finally find something in the help for a "Batch Operation". There's a barely noticeable drop down arrow on the Add New Operation button. So if you click that tiny little arrow, a drop down is displayed. Then select "Add New Operation Batch", then UniLogic will allow an entry of the Array Name, without having to back space. That drop down "arrow" could be a lot bigger. But I'm learning, one day, and one issue at a time. Thanks Again, I appreciate any and all assistance. Tim S. 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