Jump to content

Struct Command Only Partially working.


Recommended Posts

I have a network set up and I am using a Struct command to move information from PLC11 (vision 130) to PLC10 (Vision 1210). I have both the collect and extract of the two struct commands the exact same, but only part of the information I need sent is making it through. I collect the information in PLC 11 and Send it to PLC 10 where I extract it. All of my information is accurate in PLC 11, but I am not receiving all of MB1200-1249 in PLC 10. I have not been able to receive MB1244-1248 in PLC 11, I seem to be receiving the rest of that command no problem. Does anyone have any ideas as to why I am only receiving part of a segment of sent memory bits? Any help on this would be greatly appreciated! See attached screenshots for further details. 

 

 

PLC 10 receive. .png

PLC 11 Send.png

Link to comment
Share on other sites

  • MVP 2023

If Flex tips is tested

4 hours ago, Flex727 said:

not stepping on MB 1244-1248 in either PLC.

Please try to do:

1) Declare MB vector in struct  for 56 bits or better for 64 bits - mayby empfy bits is not problem in your application.

2) Use another struct in both PLC for collect MB to MI vector (and back in another PLC) and try to send it - idea use only ML and MI in UPD RAW.

3) Maybe this MB1244-1248 is used for -|p|- in program and it changes is to fast for fix in struct.

Link to comment
Share on other sites

  • MVP 2023

note....  Kratmel has replied just as I was finishing this.

Associated with what Flex is saying, I note that you are using the SAME MI series in both (all?) plcs.  When using structs I never reference them as the same numbers in other plcs, as it gets too confusing and can lead to a world of hurt, including accidentally writing over the top of a vector through this confusion.

1).  Excel is your friend to identify locations of ALL vectors of MIs that are being collected and extracted.  I wrote a little topic about this here:   http://forum.unitronics.com/topic/6527-with-vectors-why-didnt-i-think-of-this-ages-ago/?do=findComment&comment=26422

2).  If not doing so already, ensure that you label all the MIs in use for the various structs.  eg MI1200-1228 do a fill down/Copy labelling them #13RecvStr2 or similar which gives you exact description of what it does.  This ensures that you don't accidentally run over it with another vector or other use.  Look up Help, Index to Descriptions and then "Assign a Description to Multiple Operands" to learn how to do this, as the window/popup can be confusing without knowing it's usage first.

cheers, Aus

 

Link to comment
Share on other sites

Thank you all for your help. I inherited this program and the more I add and dig into it the more I don't like the methods of the original programmer. I have not found yet where anything my be stepping on my MB's but I am going to make and excel file as suggested and see if that helps. I gave up trying to make this work and just moved my MB's that I needed to a different segment of Memory bits, adjusted the MB1200's that I was sending Via struct and added a second MB segment in the Struct commands and that worked like a charm. 

Link to comment
Share on other sites

  • MVP 2023
20 minutes ago, Lacey said:

moved my MB's that I needed to a different segment of Memory bits, adjusted the MB1200's that I was sending Via struct and added a second MB segment in the Struct commands and that worked like a charm.

That pretty much says they were being stepped on somewhere. The operand search function works very well in VisiLogic, but can be misleading with vectors - you have to be careful.

Link to comment
Share on other sites

I do love the search functions but have found that if the object being searched is written into but not directly mentioned in the program or been named then the search function will not find it. Is there a way around this? As I find these errors I fix them but I am still finding these types of mistakes made by the original programmer. He would only name the start destination of the vector and not all of the items in the vector-frustrating. 

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