Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-CAN Channel Api Self-Reception Property

Hi,

 

 

We have a PXI-8464 Series 2 (1 port) CAN interface here.

 

With this single port CAN interface, we'll need to perform CAN write and CAN read for certain channels.

By using Channel API in C and setting "nctPropIntfSelfReception" property to TRUE, it should help us to achive what we want to do here.

 

"u32 nctPropIntfSelfReception:

 

Specifies whether to echo successfully transmitted CAN frames as received frames. Each reception occurs just as if the frame were received from another CAN device. This enables you to initialize the same channels for both input and output.

For self reception to operate properly, another CAN node must receive and acknowledge each transmit.

False disables self reception mode (default), and True enables self reception mode.

The self reception mode is not available on the Intel 82527 CAN controller used by Series 1 CAN hardware. For Series 1 hardware, this property must be left at its default (False)."

 

But I have a question here:

When we call "nctInitialize" to get the TaskReference, should we set the Mode to "Input" or "Output" as it is not stated clearly in the manual?

 

Currently I've set the Mode to "Output" and when I read back from the CAN bus, I receive error 0xBFF62209 which states:

"Your call to Read or Write does not match the initialized input/output mode. For example, you called Read for a task initialized as output. Solution: Consult the Programmer Reference to ensure that the initialized mode matches the read/write."

 

 

 

Appreciate if someone could help to clarify this point.

 

 

Thanks,

howmean

 

0 Kudos
Message 1 of 2
(6,134 Views)

You will need an input AND an output session. The input session would be the one you read with and the output session would be the one you would write to.

0 Kudos
Message 2 of 2
(6,130 Views)