Go Down

Topic: MCP_CAN library - Query (Read 1 time) previous topic - next topic

Mogaraghu

I am using the library from here : https://github.com/coryjfowler/MCP_CAN_lib

All 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 !

sherzaad

#1
Dec 05, 2019, 09:18 pm Last Edit: Dec 05, 2019, 09:19 pm by sherzaad
I am using the library from here : https://github.com/coryjfowler/MCP_CAN_lib

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

Mogaraghu

#2
Dec 06, 2019, 05:25 am Last Edit: Dec 06, 2019, 05:28 am by Mogaraghu
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.  And I have not been able to check it out with different values is because right now the set up is just that instrument and my MCU based CAN shield. ( I am new to this CAN stuff,  so ….!!)



Thanks!


sherzaad

#3
Dec 06, 2019, 07:36 am Last Edit: Dec 06, 2019, 07:37 am by sherzaad
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)"

Mogaraghu

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

sherzaad

#5
Dec 06, 2019, 10:58 am Last Edit: Dec 06, 2019, 11:01 am by sherzaad
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

Mogaraghu

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
:)  Sure I got it.

But what I miss is the exact number range of 3-7. Maybe it will be clear if I pore over the original CAN spec document or it must be some kind classified number range  :smiley-wink:

Go Up