Jump to content

Communication problem


Flex727

Recommended Posts

  • MVP 2023
I've run into some sort of communications limitation and I'm hoping someone can help me sort this out. What I'm trying to do is read and write some data between a UniStream 7 and a V1210 using MODBUS IP. The UniStream is the Master and the V1210 is the Slave. I set up the MODBUS configuration to do the following, which works perfectly:

 

COILS:

- Read an array of 48 coils

- Read an array of 64 coils

- Write a single coil

- Read an array of 104 coils

- Read an array of 195 coils

- Write a single coil

- Write a single coil

 

REGISTERS:

- Read a single register

- Read an array of 2 registers

- Read an array of 2 registers

 

That's a list of every line in the MODBUS Slave configuration. All are active. This works perfectly with no problems, but I found I needed to read a bit more data. When I added any additional read coils, one or more of the read registers stop working.

 

Is this a limitation of MODBUS or the UniStream? What can I do to overcome this issue?

 

By the way, I'm using version 1.12.20 of UniLogic on a Win 7-64 PC. Perhaps upgrading UniLogic will help?

Link to comment
Share on other sites

  • MVP 2023

I upgraded to UniLogic 1.13.09 but there was no change. By the way, upgrading UniLogic is a major pain. I cannot find a way to successfully upgrade the PLC to match the requirements of the UniLogic software without writing the whole thing to a DOK (a very time-consuming process) and then inserting the DOK into the PLC. If I try to upgrade the PLC directly from the UniLogic software I get this error when I try to connect via USB: "The selected PLC needs to be updated." That's fine, but when I try to update the firmware from the UniStream Manager I get this error: "No compatible version found for update." This looks like it's because the project file residing in the PLC is, of course, from the previous version and won't run until it get's updated in the new version of UniLogic. Updating feels a lot like chasing one's tail.

 

While I often have the need to transfer a LOT of data between PLCs, the above isn't that much. With Vision PLCs I would normally pack all those coils into a few registers with the Struct function. Since in the above I am reading 411 coils, that could be packed into 26 registers in the V1210, then reading would be easily done by the UniStream. The problem is that I don't know how to unpack that Struct array in the UniStream. Is there a way to do that?

Link to comment
Share on other sites

  • MVP 2023

I may have solved my immediate problem, though I'd still like to understand exactly where the limitation comes from. I performed a "Bits To Numeric" function on some of the coils in the V1210 and then performed the reverse "Num to Bits" in the UniStream. That worked by reducing the number of coils being read while increasing the number of registers.

 

It looks to me like there is an absolute limit in the number of coils that can be read using MODBUS in the UniStream. I've never noticed a similar limitation in Vision, and when I did hit a MODBUS limit, I would just initiate an additional read. I have one project that has 5 MODBUS reads of over 100 registers each. Even with the reads being initiated simultaneously, all of them execute flawlessly. Is there a similar way to initiate multiple reads in UniStream?

Link to comment
Share on other sites

  • MVP 2023

I have to backtrack on my conclusion here. The MODBUS Read Registers was working all along, but often took several minutes to update. After eliminating all the Read Coils operations by packing the bits into registers, I ended up with 7 lines of Read Registers - all but one was an array. The total number of registers being read was 33. This should be a very simple and quick operation, but one or more registers would fail to read for random periods of time, up to several minutes.

 

I solved this problem by moving all the data in the V1210 to be sequential then made a single read from the UniStream with a 33 register array. It all works perfectly now, but I'm wondering if there isn't some bug in the MODBUS Read Registers function in UniLogic. Is the function trying to execute multiple reads simultaneously causing a collision, or is it something else?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...