MVP 2023 Ausman Posted May 4, 2016 MVP 2023 Report Share Posted May 4, 2016 Hi all, I'm confused on this one and can't find anything in help files. I have been using Unican fine before in transferring data b/n V130s & 120s, running at 500Kb. But the data has always amounted to one lot which is less than 16 MIs. I now have to shift more info around and I can't figure out how to do this in one scan. I quote "A UniCAN application can send up to 32 messages, each containing 16 integer values, totaling 512 MI register values during a single program scan." If the Unican Send function only lets me do 16 MIs max, how do I send 32 x 16 of them in the extreme example? Is the statement only referring to the ability to send it to 32 different plcs? Ideally I want to assemble a single Mixed Data Struct that will end up at about 70MIs and send it out in one hit. But the only way I can think to send it, based on the info I have found, is to split it up into 5 x Structs at 16MIs max, and then do 5 sequential 16 MI sends on Unican, each one waiting clearance to have it's turn until starting over, and each one offsetting the required amount. I am obviously missing something here. Can someone please point me to a help file that explains this concept, or offer their solutions? Or have I got it right with the sequential sends? Cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted May 20, 2016 Author MVP 2023 Report Share Posted May 20, 2016 Hi all, further to this, and following some much appreciated advice from Joe T, you can just put the sends in series in the one scan and it works fine. I am still investigating how many I can do reliably. At present I have 3 going ok and will increase this slowly, but perhaps it can run up to the full 32 mentioned without issue. I have them all set as low priority at present. Cara, could we please have a bit more literature available about this? I can find nothing at all for this scenario which can't be unusual. It would be nice to know the official knowledge/version to save experimentation hassles. cheers, Aus Link to comment Share on other sites More sharing options...
MPS_Systems Posted June 30, 2016 Report Share Posted June 30, 2016 Hi, Just add a rung and anthere Unican Send.. Link to comment Share on other sites More sharing options...
MateK SB Posted March 28, 2022 Report Share Posted March 28, 2022 Hello, @Ausman I would ask you to share screen shot of how you did multiple "STRUCT" and "UniCAn Send "commands? (i have 23MIs long vector to send form V1210 to RC1). Best regards, Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted March 28, 2022 Author MVP 2023 Report Share Posted March 28, 2022 Matek, it is a bit hard to do screen shots of this due to separate popups for each Unican Send. If your vector is already sequential (sounds like it is) you will likely not need to do Structs. Simply do 2 Unican sends in series, with the first one sending up to 16 MIs, and then the second sending the remainder. For example, if your vector of 23 starts at MI2000, your first Unican Send source start address would be MI2000 and length might be 16, and the second send starts at MI2016, with length of 7. Both of these would be set to send to a corresponding MI vector in the destination. The screenshot I can do is just an example of the series layout of the sends. The vertical preceeding things comes in from what controls the send. I have found that you can't have it banging away all the time, it needs to be time controlled, which varies with program complexity. This screenshot looks odd if you don't know how the element is displayed, but when you bring up the details box by double clicking on it, things will make perfect sense. cheers, Aus Link to comment Share on other sites More sharing options...
MateK SB Posted March 29, 2022 Report Share Posted March 29, 2022 Hello Ausman, @Ausmanthank you for your feedback, in attachment few pictures of my program, please check it and tell me if iam going in right direction? Best regards, Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted March 29, 2022 Author MVP 2023 Report Share Posted March 29, 2022 So a struct is needed and it is telling you the block length is 24MIs. So your sends are going to be 16 & 8, which you've obviously figured out yourself. You need to correctly locate the start and delivery MIs for each send according to this. Your first send as shown in the ladder (not the way you've got them displayed here) is correct, but your second one still references MI1800 as the start point...this is incorrect. The start point is 16MIs further along the vector. Your "8" length here is correct. I suggest that you keep track of all of this in your written program description, using an excel sheet. I also suggest that you act on my advice here: https://forum.unitronics.com/topic/8724-data-table-using-string/?do=findComment&comment=36667 as it is all too easy to miss the use of Vector areas if a description is not applied, and overlap other things into the same operands. I don't understand your writing MI1800 to MI1810 though. Is this related to my comment above, in that you've forgotten the vector is used? If you need to do buffer work for compares, don't do it in the struct's vector. Leave that alone and write the final details to it only as necessary. I might have this incorrect, but from what I see it looks like you are only sending things when something changes. Personally I wouldn't do this. I'd use the KISS principle and send things ALL the time, with the necessary actions all happening at the receiving end. This will avoid any send hiccouphs. Ohhhh, maybe not.... I just remembered you're sending to an RC1. In theory, though, the same thing applies, unless somehow this is going to cause excessive chattering of outputs. cheers, Aus Link to comment Share on other sites More sharing options...
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