Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Transmitting mulitple messages on CAN Bus with the baud rate defined in the dbc file

Iam using the USB_CAN_Basic_Output.vi which shipped from the Can frame to channel conversion library to transmit messages on CAN Bus. I was interested  to know if this vi transmits messages with the task rate as defined in the dbc file, which we are inputing to the vi ? If not are there any vi's that I can make use of to transmit multiple messages with different task rates.

 

Thanks in advance

 

-Raghu.

0 Kudos
Message 1 of 4
(7,214 Views)

Hello Raghu,

 

The example you are looking at will transmit at the Baud rate specified on the front panel for the example. If you want to transmit at different baud rates you are going to have to use another CAN port, or you are going to have to stop the CAN task, reset the baud rate, then start the CAN task. You can't change the baud rate in the middle of a task. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(7,197 Views)

Adam, Sorry I mentioned as a Baud rate, actually  I was looking for the broad cast rate / cycle time, defined in the dbc file. As shown in the attached snapshot of a dbc file, each arbitration ID has a different task rate. So Can i use the CAN_Basic_output.vi example to transmit the channels with the broadcast rate defined in the *.dbc file.

 

Thank you

Raghu.

0 Kudos
Message 3 of 4
(7,191 Views)

Hello Raghu,

 

I do not believe you are going to be able to use the cycle time with the USB-CAN device you are using. The USB-CAN devices can only use the frame API. Even though you are using the Frame to Channel Conversion Library it will not be able to use the cycle time for it. You could set up some software timed loops to use for the CAN frames to write them out. Have a great day!

 

Best Regards,

 

Adam G 

National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(7,187 Views)