Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Periodically sending CAN frames

Hai Friends.....

i am facing a problem with periodically sending CAN Data frames,,,,few of the CAN Data are reached the end system but few of data are not reached where my data are having different arbitration ID...,my software is running fine about 5 to 6 times without any issue after that some of the CAN messages are not reached the end system....if i restart the PC, it is working fine....,so please help me on this,...what is the reason for this issue....I want to send CAN Data frames periodically with different arbitration ID without restarting the system...,

0 Kudos
Message 1 of 4
(6,293 Views)

Hi msarun,

 

Would it be possible for you to post your code or a screen shot of your code?

 

Also, you mention that restarting your computer fixes the problem. Does this mean that simply closing and reopening the VI, or restarting LabVIEW does not solve the problem?

Also to clarify, do you only run into problems if you change the arbitration ID?

 

It would be helpful to post your LabVIEW version and driver versions as well.

 

Have a great day!

 

 

 

 

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 2 of 4
(6,274 Views)

Thanks for your response Mr.Tanya,

Please find the attached screenshots. i am using Write CAN Data.vi for sending CAN messages and i am using CAN Close.vi to close the CAN Port at the end(After sending all CAN data).

Download All
0 Kudos
Message 3 of 4
(6,257 Views)

Hi msarun,

 

Usually the CAN close would be in the same VI as the Open. Also your write should be in a loop. Take a look at the built in CAN examples in LabVIEW for an idea of how the code should be structured. Look in the Example Finder under Hardware Input and Output»CAN»NI-CAN»Frame API»Basic»CAN Transmit - periodic.vi.

 

Here's a snippet of the code.CAN periodic transmission.png

 

With the above example, to change the arbitration ID, you will need to close the connection, change the ID and then run through the configuration again.

 

I hope this helps!

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 4 of 4
(6,246 Views)