Itzik Posted October 15, 2010 Report Share Posted October 15, 2010 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 Quote Link to comment Share on other sites More sharing options...
MVP 2021 Joe Tauser Posted October 17, 2010 MVP 2021 Report Share Posted October 17, 2010 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. Quote Link to comment Share on other sites More sharing options...
Itzik Posted October 17, 2010 Author Report Share Posted October 17, 2010 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 Quote Link to comment Share on other sites More sharing options...
Emil Posted October 17, 2010 Report Share Posted October 17, 2010 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. Quote Link to comment Share on other sites More sharing options...
Itzik Posted October 18, 2010 Author Report Share Posted October 18, 2010 But what if I nedd to send deferent data in somr srnd commands ? The structure must be the same in all Send commands.... Quote Link to comment Share on other sites More sharing options...
Emil Posted October 18, 2010 Report Share Posted October 18, 2010 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. Quote Link to comment Share on other sites More sharing options...
Itzik Posted October 18, 2010 Author Report Share Posted October 18, 2010 Sorry... What I mean is: what if I need to send diferent structure of collect and struct in some send commands ? Quote Link to comment Share on other sites More sharing options...
Emil Posted October 18, 2010 Report Share Posted October 18, 2010 Do you mean, that each time you will send different data and the combinations will be practically endless? There will be no any repeatability? Quote Link to comment Share on other sites More sharing options...
Itzik Posted October 18, 2010 Author Report Share Posted October 18, 2010 Yes. Some Send command will have diferent Collect and Struct structure then others. Quote Link to comment Share on other sites More sharing options...
Emil Posted October 18, 2010 Report Share Posted October 18, 2010 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.