Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN performance

Hi !! I have a problem

I have to make a labview application which works like that :

1) Read about 120 DI,AI,PWM (at 10 000 Hz)
2) Analyze these datas in order to know if there values have changed (delta change for AI, PWM)
3) Transmit the values which changed on a CAN bus (every 5 ms)

This application have to works under windows XP... with Labview 7.1.I don't want to be defeatist but it seems tome it's impossible to archieve this under windows ... I haven't done any test till now (cause i haven't the CAN cards), but i think's it's not possible to garantee a 5 ms cycle to write a CAN message !

Did anyone test CAN performances or realize an application like that ??
Any advice or help would be really appreciate !! Thanks !!!
0 Kudos
Message 1 of 3
(3,473 Views)
Hi KaBooOoom.

You can setup periodic (repeating) messages in NI-CAN. Those messages are actually executed on the CAN hardware and thus can achieve the 5ms (200 Hz). However, as Windows is not a deterministic OS, you can't guarantee, that your VI executes its measurement loop every 5ms and thus it might not update the data the CAN card writes in time. Thus, the CAN card will still repeat the transmission of the previous data.

In other words: Windows might ‘stop’ the VI after your DAQ measurement is done and process a different application (e.g. virus scanner, swap memory, etc.) for a while. At one point, Windows will switch the execution back to your VI, but there might have been 5 or more ms spend not executing your VI and thus your application won’t update the CAN card in time.

If the 5ms is not a strict requirement, try it out. Otherwise you need to use a deterministic OS like LabVIEW Real-Time, to avoid this kind of problem.

-B2k
0 Kudos
Message 2 of 3
(3,467 Views)
Hi biker.. thanks for your answer !!

Hmmm.. that's what i thought! I made some tests yesterday, i tried to read an DI and to write this value in a DO, every 5 ms using a cadenced loop ! And it works in most of the case, but you can't garantee this (e.g. if you move the taskmanager, you lose some cycles)!

Well, if i use labview RT i will be able to garantee this cycle, but i'ms not sure the can hardware allow me to write a message every 5 ms (5ms is the worst performance we must reach, ideally we should have a cycle of 1ms). That mean, we should read a value on a DAQ card, analyse this value and transmitt it through the CAN bus 1ms later, i can't use buffer or queue in order to prepare the data to send ...!
0 Kudos
Message 3 of 3
(3,456 Views)