Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CanErrComm

HI,
 
I wanna know if the controller is BusOff state, NI-CAN returns CanErrComm, ok, but where can i get it ? (return of ncWrite() or where !)
 
thenk you
0 Kudos
Message 1 of 7
(4,975 Views)

The next NI CAN function you try to call after you have the bus off will give you the error message. You can poll for any state using the get attribute function.

DirkW

0 Kudos
Message 2 of 7
(4,964 Views)

Hi DirkW

Sorry but i am new in that field, What do u mean by "Get Attribute Function" ??

another question : if i send a message (from my application under CVI ) to  the  calculator, und the calculator is out of order, How can i check that ? how can i know that my frame doesn't reached the calculator ?

 

thank you Dirkw

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

Hi

See page 11-61 of the CAN manual comming with the driver, for how to use the state property with the get property function with CVI.

Attached you can find an example, that writes and reads data, thus you can see how to create a good error handling, to get an error if your device is not acknowledging your request.

DirkW

0 Kudos
Message 4 of 7
(4,951 Views)

HI again,

 

I am tring to used the exmple, juste before that : i have a NI-CAN 2.1.3  und S1 board, i hope that don't make a trouble,

what about the buffer (write queue und read queue) , if i try to use ncWrite und ncRead in the same function (they have the same CAN Network Interface Obeject), will that make a trouble?

for exemple :

{

ncWrite(Tx,.....);

ncRead(Tx ....);

}

thank you again

0 Kudos
Message 5 of 7
(4,947 Views)
The example should work with series 1 and your driver and yes you can use the same port handle for both write and read.
 
DirkW
0 Kudos
Message 6 of 7
(4,919 Views)
thank u ,
0 Kudos
Message 7 of 7
(4,916 Views)