Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How to transmit multiple messages over CAN

Hi All,

 

How to transmit multiple messages over CAN ? With all three messages i want to send the system time & date also.

 

How can i get the timestamp in DBL format (Since the timestamp in the input of ncWriteNetMult.vi is a DBL). If possible kindly share the code in Labview 7.1 also.

 

Thanks in advance.

 

J

 

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

The NI-CAN driver brings examples for nearly every use case. Driver version 2.4 or later has the Write multiple function to write multiple frames at ones. There is an example available for LabVIEW, CVI and VC/VBasic called CAN Transmit multiple.

Also check the attached VI and the Can manual: http://www.ni.com/pdf/manuals/370289m.pdf

 

What do you mean by converting Timestamp to DBL? Timestamp contains all date and time information. You can convert it into string format as shown below and then use the relevant data from it by string operations.

Hope this solves your problem.

 

Untitled.jpg

Shreyas Hebbare
Shreyas Technologies
India
0 Kudos
Message 2 of 4
(7,173 Views)

Hi,

 

Thanxs for the reply.

 

Ya in LabVIEW there is ncWriteNetMult.vi function. If i want to transmit multiple frames i can use this function.

 

But Input of this function, Data Array consists of Timestamp, DBL data type.

 

How to enter timestamp programmatically ?

 

 

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

Hi,

    To convert your timestamp to DBL use the 'DBL' function in the conversion palette. This will take a timestamp as an input.See the below screenshot.

 

Hope that solves your problem. 

Kudos are welcome.

Untitled.jpg

Shreyas Hebbare
Shreyas Technologies
India
0 Kudos
Message 4 of 4
(7,167 Views)