12/18/2024 2:02 PM | |
Joined: 12/18/2024 Last visit: 12/18/2024 Posts: 1 Rating:
|
Hello, I have trouble reading several Modbus TCP "register groups". Transmitter: E+H CM44R Here is the Modbus guideline, which can be found under "Downloads > Manuals and Datasheets > Special Documentation (SD)": Overview I want to read out various registers. This works so far; however, I have created a separate FC for each "register group." My Plan My idea was to create an FB that contains an MB client block. Variables like MB_Mode, address, length, and storage location are passed via variables. The Problem The problem with this approach is that the data I already receive is directly stored in various DBs, and some are even converted into UDTs. For example, data in a float is automatically converted into a real. At first, I thought this was great, but now I see the problem: I can't change the storage location variable because it uses different data types, such as from an array of Word [0...X] to an array of [UDT name(0...X)]. Possible Solution? I have come across pointers, but I don't fully understand them, so I would prefer a different approach: This does not work, because for the MOVEBLK the source needs to have the same datatype like the target. Not the case when moving from Array of Word to Array of (UDT name). Below is a list of all the registers to be read and their corresponding page numbers in the Modbus guideline (SD01189CEN_07.22.pdf). Registers:
Reading Register 0 - 10251 in one go? 125 Words the limit?! Looking forward to your feedback, suggestions, and ideas. Thanks ~Daniel |
Follow us on