CAN 端口错误识别为“CAN-1”导致错误 -1074384758

更新 Dec 1, 2023

适用于

硬件

  • NI-9860
  • Industrial Controller

软件

  • LabVIEW
  • Measurement & Automation Explorer (MAX)

驱动

  • NI-XNET

问题详述

有时我的 CAN 端口在 LabVIEW 和 NI Measurement and Automation Explorer (MAX) 中被错误识别为“CAN-1”。发生这种情况时,我会看到如下所示的错误。我怎样才能解决这个问题?

Error -1074384758 occurred at an unidentified location

Possible reason(s):

NI-XNET:  (Hex 0xBFF6308A) The interface name given does not specify a valid and existing interface. Solution: Use a valid and existing interface. These can be obtained using MAX, XNET system properties, or the LabVIEW XNET Interface IO name. If you are using CompactRIO, refer to the topic "Getting Started with CompactRIO" in the NI-XNET Hardware and Software Help.


解决方案

这是一个已知问题,已在 NI-XNET 17.5 中修复。请升级到 NI-XNET 17.5 或更高版本以解决此问题。

注释:如果升级到 NI-XNET 17.5 或更高版本不是一个可采取选项或不能解决问题,则在进行任何 NI-XNET 调用之前添加 500 毫秒的延迟编码以解决此问题的另一个方法。这方法是可行的,因为 FPGA 上有特殊的 IP 允许 NI-XNET 运行。这个 NI-XNET FPGA IP 需要大约 500 毫秒才能启动,之后 NI-XNET 调用将正常运行。

相关信息

当 LabVIEW 或 MAX 尝试与 NI-XNET 设备建立连接并且 NI-XNET 设备上的固件超时读取寄存器,就会出现上述问题。这会导致 MAX 将设备重命名为默认“CAN-1”。