Jump to content
Sign in to follow this  
Itzik

How to send more then 32 Byts in UniCan ?

Recommended Posts

Hello. I need to send large amount of MI's in Unican.

What is the right way to do it, consider that the max. amount of byts/send command is 32 (16 MI's).

Thank You

Itzik

;)

Share this post


Link to post
Share on other sites

You're going to have to multiplex them. The easiest way I've found is to increment a pointer with a short timer and trigger different Send blocks tied to different pointer values. This way you don't have to keep track of block transfers on both ends.

Joe T.

Share this post


Link to post
Share on other sites

You're going to have to multiplex them. The easiest way I've found is to increment a pointer with a short timer and trigger different Send blocks tied to different pointer values. This way you don't have to keep track of block transfers on both ends.

Joe T.

I tried. You can't send more then 1 send block - bacause there is only 1 message arrived block at the other plc, and all data should matc.

Itzik

Share this post


Link to post
Share on other sites

You can send many messages "at a time". UnuCAN send is not synchronised with scan time. There is a buffer of 16 messages x 16 MI each. In fact, there are two buffers x 16 messages each - for low priority and high priority.

In your case - you can send messages untill the buffer is not full (see relevant SI - it needs to be less than 16!). Every time "Message recewived" bit rise, you will extract all messages expected. This can lead to extract twice the same message, which in this case doesn't seem to me critical.

Share this post


Link to post
Share on other sites

Let's say you will define 5 x blocks UniCAN Send. Each blck will have its own struct module, which will close requested data to a vector of 16 MI.

Having in the second unit the bit "message received", you will activate all 5 Struct modules to "open" te data to requested registers. In this logtic, maybe you wil l"open" the same vector more than once. I don't see any problem on that, as the vector comes from communication and it wil not change until the next data received.

Share this post


Link to post
Share on other sites

Do you mean, that each time you will send different data and the combinations will be practically endless? There will be no any repeatability?

Share this post


Link to post
Share on other sites

Which controllers you're using?

What is the distance between them?

Maybe in thisw specific case data transfer via Master - Slave protocol can be better soluiotn. Modbus? Ethernet?

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...