National Instruments NI-XNET#

This interface adds support for NI-XNET CAN controllers by National Instruments.


NI-XNET only supports windows platforms.


class can.interfaces.nixnet.NiXNETcanBus(channel, can_filters=None, bitrate=None, fd=False, fd_bitrate=None, brs=False, can_termination=False, log_errors=True, **kwargs)[source]#

Bases: BusABC

The CAN Bus implemented for the NI-XNET interface.

  • channel (str) – Name of the object to open (e.g. ‘CAN0’)

  • bitrate (int) – Bitrate in bits/s

  • can_filters (list) – See can.BusABC.set_filters().

  • log_errors (bool) – If True, communication errors will appear as CAN messages with is_error_frame set to True and arbitration_id will identify the error (default True)


CanInitializationError – If starting communication fails

send(msg, timeout=None)[source]#

Send a message using NI-XNET.

  • msg (can.Message) – Message to send

  • timeout (float) – Max time to wait for the device to be ready in seconds, None if time is infinite


can.exceptions.CanOperationError – If writing to transmit buffer fails. It does not wait for message to be ACKed currently.


Resets network interface. Stops network interface, then resets the CAN chip to clear the CAN error counters (clear error passive state). Resetting includes clearing all entries from read and write queues.


Close object.