Jump to content

Increasing the size of an existing array within a STRUCT


shane.platt

Recommended Posts

I am a control engineer and was brought in on an existing project consisting of a Omron vision system and a Unitronics  USP-070-B10. I was tasked with adding additional measurement tools to the vision system. The vision system is utilizing an  10 indices array(float) nested inside a STRUCT. I am planning to add 50 more measurements to the vision system. I thought it would be easier to just increase the size of the existing array to accommodate the new measurements. After increasing the size of the existing array I compiled the project and oddly enough I had about 40 mismatches between the PC and the PLC including communication mismatches that were not there prior to the increase. I went ahead an downloaded the file to the plc. After the download was complete I could no longer connect to the vision system, nor could I connect to the collaborative robot that the Omron camera was mounted on. I generally only work with Beckhoff, Allen Bradley, or Siemens PLCs, so I am not very familiar with Unitronics. I know in the past 30 years of programming I have modified the index size of arrays on countless systems, and never had an issue. Has anyone ran across a similar issue when increasing the number of indices in an existing array?? I modified nothing else in the programming except for the number of indices in one array and literally nothing works.   Does this have something to do with the way the PLC is allocating the memory? I have never seen a option in any other PLC to "Reallocate Memory".  The documentation doesn' t mention "Reallocate memory" anywhere, so I have no idea when or why I would need to use that. Can anyone shed some light on that?? 

 

Thanks,

Shane

Link to comment
Share on other sites

On 12/22/2020 at 11:11 PM, shane.platt said:

I am a control engineer and was brought in on an existing project consisting of a Omron vision system and a Unitronics  USP-070-B10. I was tasked with adding additional measurement tools to the vision system. The vision system is utilizing an  10 indices array(float) nested inside a STRUCT. I am planning to add 50 more measurements to the vision system. I thought it would be easier to just increase the size of the existing array to accommodate the new measurements. After increasing the size of the existing array I compiled the project and oddly enough I had about 40 mismatches between the PC and the PLC including communication mismatches that were not there prior to the increase. I went ahead an downloaded the file to the plc. After the download was complete I could no longer connect to the vision system, nor could I connect to the collaborative robot that the Omron camera was mounted on. I generally only work with Beckhoff, Allen Bradley, or Siemens PLCs, so I am not very familiar with Unitronics. I know in the past 30 years of programming I have modified the index size of arrays on countless systems, and never had an issue. Has anyone ran across a similar issue when increasing the number of indices in an existing array?? I modified nothing else in the programming except for the number of indices in one array and literally nothing works.   Does this have something to do with the way the PLC is allocating the memory? I have never seen a option in any other PLC to "Reallocate Memory".  The documentation doesn' t mention "Reallocate memory" anywhere, so I have no idea when or why I would need to use that. Can anyone shed some light on that?? 

 

Thanks,

Shane

I agree Support is going to be your best bet but I would start by looking at:

How are they communicating? Ethernet/IP, Modbus?

When adding vision "measurements" in the vision controller, does the communications struct that was previously running already have place holders for those bytes? Hard to put into words but if you made changes to the communication struct in the plc it would not match the output coming from the vision controller. In the picture attached if the input size changed (by adding components) unless your actual output coming from the Omron also changed size you would have a mismatch and it likely would not work. 

-Swervomotor

ip.png

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...