Ixxat on Windows 7 x64

Issue #82 resolved
Mathias Giacomuzzi created an issue

Hello,

I already used peak can works. Today I get an Ixxat V2 I tried to use it now with python-can with no success. So can someone give me a hint how I get the ixxat to work with python-can?

Comments (5)

  1. Mathias Giacomuzzi reporter

    I get this error

    Traceback (most recent call last):
      File "C:/Users/lwnrif0/PycharmProjects/can-projects/li_can_mst_emu/start.py", line 3, in <module>
      File "C:\Users\lwnrif0\Env\py35_64_pythoncan_5\lib\site-packages\python_can-1.5.2-py3.5.egg\can\interfaces\interface.py", line 72, in __new__
        return cls(channel, **kwargs)
      File "C:\Users\lwnrif0\Env\py35_64_pythoncan_5\lib\site-packages\python_can-1.5.2-py3.5.egg\can\interfaces\ixxat\canlib.py", line 231, in __init__
        _canlib.canChannelOpen(self._device_handle, channel, constants.FALSE, ctypes.byref(self._channel_handle))
      File "C:\Users\lwnrif0\Env\py35_64_pythoncan_5\lib\site-packages\python_can-1.5.2-py3.5.egg\can\interfaces\ixxat\canlib.py", line 56, in __check_status
        raise VCIError(function, result, arguments)
    can.interfaces.ixxat.exceptions.VCIError: <exception str() failed> 
    
    There I get  result = 3758161943 which equals constants.VCI_E_INVALID_INDEX
    

    thx

  2. Mathias Giacomuzzi reporter

    It seems as if the channel numbers for the ixxat start at 0 and not at 1. If i change the channel parameter to "0" everything works. bus = can.interface.Bus(bitrate=250000, channel=0, bustype="ixxat")

    Please close issue maybe this should be added to the documentation.

  3. Phippu

    I'm using python-can within the package canopen. I stumbled upon this ixxat problem and found a solution. My Error:

    >>> import canopen
    >>> 
    >>> network = canopen.Network()
    >>> 
    >>> node = network.add_node(6, 'sample.eds')
    >>> 
    >>> network.connect(channel=0, bustype="ixxat", can_filters=None)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\PortableApps\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\canopen\network.py", line 92, in connect
        self.bus = can.interface.Bus(*args, **kwargs)
      File "C:\PortableApps\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\can\interfaces\interface.py", line 62, in __new__
        from can.interfaces.ixxat import IXXATBus
    ImportError: cannot import name IXXATBus
    

    in can/interfaces/interface.py is this part of the code:

    .....
    59            from can.interfaces.usb2canInterface import Usb2canBus
    60            cls = Usb2canBus
    61        elif interface == 'ixxat':
    62            from can.interfaces.ixxat import IXXATBus
    63            cls = IXXATBus
    64        elif interface == 'virtual':
    65            from can.interfaces.virtual import VirtualBus
    67            cls = VirtualBus
    .....
    

    When I change this part of the code to this:

    .....
    59            from can.interfaces.usb2canInterface import Usb2canBus
    60            cls = Usb2canBus
    61        elif interface == 'ixxat':
    62            from can.interfaces.ixxat import Bus
    63            cls = Bus
    64        elif interface == 'virtual':
    65            from can.interfaces.virtual import VirtualBus
    67            cls = VirtualBus
    .....
    

    I am able to connect to the ixxat adapter. Please, someone that has the overview of the code change this.

    Thanks, phippu

  4. Brian Thorne repo owner
    • changed status to resolved
    • edited description

    Hey there, please try the latest version on our github (or the alpha version on pypi) and if it is still incorrect open a new issue on github

  5. Phippu

    @hardbyte The issue I posted is solved in v.2.0.0a1 Thank you!

    @mgiaco if you get an "can.interfaces.ixxat.exceptions.VCIError" it is maybe because you are connected to the ixxat device by another program.

  6. Log in to comment