Lacey Posted September 29, 2020 Report Posted September 29, 2020 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.
MVP 2023 Flex727 Posted September 29, 2020 MVP 2023 Report Posted September 29, 2020 What I would look for in this situation is to make sure you're not stepping on MB 1244-1248 in either PLC.
MVP 2023 kratmel Posted September 30, 2020 MVP 2023 Report Posted September 30, 2020 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.
MVP 2023 Ausman Posted September 30, 2020 MVP 2023 Report Posted September 30, 2020 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
Lacey Posted September 30, 2020 Author Report Posted September 30, 2020 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.
MVP 2023 Flex727 Posted September 30, 2020 MVP 2023 Report Posted September 30, 2020 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.
Lacey Posted September 30, 2020 Author Report Posted September 30, 2020 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.
MVP 2023 Flex727 Posted September 30, 2020 MVP 2023 Report Posted September 30, 2020 Like I said, the search function only sees the first element of a vector unless individual elements of a vector are used elsewhere. You have to keep track of vectors in use and their length when utilizing the search function (and when assigning operands in general).
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