Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Create CAN channels

How to create CAN channel for messages with same message name & message ID but varying arbitration ID & equipment type

0 Kudos
Message 1 of 8
(6,743 Views)

Hello Gujjula,

 

Can you give me a little more information.  Are you creating channels and messages through Measurement & Automation Explorer?  What do you mean by message ID and equipment type?

 

When creating a message, you have to specify the name, arbitration ID, number of data bytes, and default interface.  When creating a channel, you have to specify the name, arbitration ID, number of data bytes, and default interface.  You can create multiple channels per message, but not one channel for multiple messages, so I am a little confused by your question.  Please clarify and I will do what I can to help you out.

 

Thanks,

 

Brandon V.

Applications Engineering

National Instruments

www.ni.com/support

 

 

0 Kudos
Message 2 of 8
(6,726 Views)

Yes, I am using Measurement & Automation Explorer.

Message ID: I use an X-bit identifier to identify varies messages available and Equipment Type Number:  serves as an identifier of a category of logical device on the Bus. There are sometimes multiple Equipment Type Numbers for the same device category.

 

Each logical device has a unique message ID, and based on this message ID the Arbitration ID is calculated. Because of this for the same message name I might have different Arbitration ID’s.

When I create a message name, I do specify the name, arbitration ID, number of data bytes and default interface but when I have to create a second message with same message name but with different arbitration ID it gives an error ‘ A message with this name already exists’.

0 Kudos
Message 3 of 8
(6,717 Views)

Hi Gujjula,

 

I am not aware of any workaround that will allow you to create multiple messages with the same message name, but I am investigating how it could be done.  Why do the messages need to have the same message name?  Can you use messages with different message names for your application?

 

Regards,

 

Brandon V.

Applications Engineering

National Instruments

www.ni.com/support

 

 

0 Kudos
Message 4 of 8
(6,707 Views)

I cannot have different message names. Whenever I see a certain message on the bus I spare the data based on the message name.

 

0 Kudos
Message 5 of 8
(6,702 Views)

Hey Gujjula,

 

It is possible to create messages and channels during runtime in LabVIEW, but there is no channel name or message name created. So, everything you create during runtime is created temporarily as a handle, and identification is possible only by the message ID or handle. 

 

You can create a .ncd file that defines messages with the same message name, but when the .ncd file is loaded in MAX, it prompts you to add a prefix to any messages that have the same message name.

 

In short, I don't think you will be able to define multiple messages with the same message name.

 

Regards,

 

Brandon V.

Applications Engineering

National Instruments

www.ni.com/support

 

 

 

 

 

 

0 Kudos
Message 6 of 8
(6,694 Views)

I have the same problem..

In my application, the Arbitration ID is derived based on a fixed component and some run time component. The fixed component identifies my unique message, and the run time information is an attribute of the fixed component.

I wanted to define CAN channels in MAX using the fixed component of my arbitration ID and putting 'x's for the run time components; but I could not find a way to do this.

Can we define channels with such arbitation IDs in MAX ?

 

Regards,

Shekhar 

0 Kudos
Message 7 of 8
(6,690 Views)

Hey ShekharK,

 

You can't define them with variables in MAX, but you can programmatically create the messages with different arbitration IDs using the NI-CAN API.  Go to Start >> Programs >> National Instruments >> NI-CAN >> NI-CAN Software and Hardware Manual and check out chapters 6-11 depending on what language you are using.

 

Regards,

 

Brandon V.

Applications Engineering

National Instruments

www.ni.com/support

 

 

0 Kudos
Message 8 of 8
(6,677 Views)