Jump to content

Unican sends 512 MIs per scan....How?


Recommended Posts

  • MVP 2023

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

  • 3 weeks later...
  • MVP 2023

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

  • 1 month later...
  • 5 years later...
  • MVP 2023

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

Unican.jpg.885860047e57b4d692fab12368190c84.jpg

 

Link to comment
Share on other sites

  • MVP 2023

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

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