Discussion:
CAN read error - 10730946
(too old to reply)
tommyl9
2008-02-21 13:40:07 UTC
Permalink
Im trying to get a signal from a car CAN bus. The first few time I run my labview programme it works fine. However, after a while I get the above CAN read error and this description/solution:

"The data returned from this Read matches the data returned

from the previous call to Read. Solutions: If you merely want

the most recent data, ignore this warning; If you are using the

NI-CAN Frame API or NI-DNET, you can Wait for the Read

Avail state prior to calling Read."

The description makes sense as its likely the data returned from this read is equal to that returned from the last read. But I cant just ignore the warning as I'm now getting a readout of zero. I'm using the NI-CAN channel API so the Frame information doesnt help either. Is there any way I can progamme some sort of reset for every time I run? Or is there some other solution?

Many thanks, Tom.
DirkW
2008-03-03 14:40:05 UTC
Permalink
The Channel API read as different modes. If you configure the read for "Input" it samples the incomming data frames with the sample rate you specified. If the sample rate is zero, it updates the values whernever the read is called.
If no Frame has arrived yet after you started the VI, the driver takes the default value specified within MAX or your db file for the channel. Thats most likely zero, but configurable. The driver updates the channel value when the next Frame arrives.
If you would like to update your value only when a Frame arrives, you could use the "timestamped Input" mode. This mode only reads values when a Frame arrives or the Read gets executed and the sample rate is ignored.
DirkW

Loading...