I am using the library from here : https://github.com/coryjfowler/MCP_CAN_libAll well but just a query: In case I want to set the Priority value in the sendCAN_Msg() can I set it ?I am right now using it like this :byte sndStat = CAN0.sendMsgBuf(0x1CFF01F2, 1, 2, data);In the above the format is this : sendMsgBuf(ExtendedID,1,Data length, data). Was wondering if the '1' denotes Priority ? Thanks for any help !
the '1' here is used to let the chip know that the CAN ID used is of extended type.and you must have read about now CAN works with regards to messaging priority! Quoting an extract from wikipedia (https://en.wikipedia.org/wiki/CAN_bus)"...the lower the numerical ID and hence the higher the message priority..."
Sure. This is my understanding. Got a bit confused by the configuration fields provided in a instrument that I am working with … see the image below. It has a specific field for Priority and reason why I asked. ....
did you check the App manual (https://www.sunhydraulics.com/sites/default/files/media_library/tech_resources/XMD%20Mobile%20App%20User%20Manual.pdf)page 18-19 describes what 'priority' means"Priority designates the order in which messages will be sent (3-7)"
I am glad you navigated to the right document. Yes I must have read it so many times... but the number 3-7 is what got me. Actually in the case of the XMD amplifier it has only two two transmission channels and whatsthe significance of 3-7 Thanks
It's there.... in plain english (at least that's my undersanding):"Priority designates the order in which messages will be sent (3-7)"my guess is that if messages you create with priority '3' are transmitted first (or as soon as possible), then '7' would mean message has the lowest priority.No sure if that has anything to do with the RAW CAN ID's transmitted.... possible got to do with the message content