Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-CAN simultaneous Read/Write at different sample rates

Hello everybody,

I am a beginner in LabVIEW and here is my problem :
I would like to read a CAN message every 10ms, and then write a CAN message (with the data received from the CAN Read.vi) every 20ms.
Do I have to build 2 different While loops to do it ? If it's right, how can I share the data between the 2 loops, without losing any value ? With queues ???

I have already made a VI that read and write at the same sample rate (i.e. 100 Hz => 10 ms). But when I put 50 Hz in the Task Init Start function for the CAN Write function, I'm losing values (I have only 1 While loop).

If you have any exemple of functions doing nearly the same, I am interessed in.

Thanks in advance !
0 Kudos
Message 1 of 2
(5,675 Views)

Same post has been posted in the French section.

Please refer to it for more information :

http://forums.ni.com/ni/board/message?board.id=4170&message.id=19294

Regards,

Alexandre - NIF
AE

Alexandre M. | Certified LabVIEW Developer
Embedded and Control Systems Engineer (NI France)
0 Kudos
Message 2 of 2
(5,644 Views)