USB-CAN USB-8473s で定期送信したい

サービスリクエストNo.766130です
OS:WindowsXP
開発環境:Visual Basic 6.0
USB-CAN USB-8473s
NI USB-8473s を用いて
相手ECUのID100hに対して10ms 周期で定期送信処理を
行うためのプログラムを作成中です。
プログラム起動時、下記のプロシージャを実行するのですが、
Status = ncConfig("CAN0:TD0x100", 7, AttrIdList(0), AttrValueList(0)) の
戻り値が 0 にならず、設定ができません。
戻り値 BFF6210Dhになりました。
この問題を回避する有効な手法はありますでしょうか?
よろしくお願いいたします。 
Private Sub Can_Open()
    Dim AttrIdList(10) As Long
    Dim AttrValueList(10) As Long
    Dim nret As Long
    nret = 0
    '// CANネットワークインターフェースの設定
    AttrIdList(0) = NC_ATTR_BAUD_RATE
    AttrValueList(0) = NC_BAUD_500K
    AttrIdList(1) = NC_ATTR_START_ON_OPEN
    AttrValueList(1) = NC_TRUE
    AttrIdList(2) = NC_ATTR_READ_Q_LEN
    AttrValueList(2) = 10
    AttrIdList(3) = NC_ATTR_WRITE_Q_LEN
    AttrValueList(3) = 10
    AttrIdList(4) = NC_ATTR_CAN_COMP_STD
    AttrValueList(4) = 0
    AttrIdList(5) = NC_ATTR_CAN_MASK_STD
    AttrValueList(5) = NC_CAN_MASK_STD_DONTCARE
    AttrIdList(6) = NC_ATTR_CAN_COMP_XTD
    AttrValueList(6) = 0
    AttrIdList(7) = NC_ATTR_CAN_MASK_XTD
    AttrValueList(7) = NC_CAN_MASK_XTD_DONTCARE
    AttrIdList(8) = NC_ATTR_LISTEN_ONLY
    AttrValueList(8) = 0
    AttrIdList(9) = NC_ATTR_HW_SERIES
    AttrValueList(9) = NC_HW_SERIES_847X_SYNC
    Status = ncConfig("CAN0", 10, AttrIdList(0), AttrValueList(0))
    If Status <> 0 Then 'NC_SUCCESS Then
        MsgBox "CANオープン前設定1エラー"
        nret = -1
    End If
    If nret = 0 Then
        '//ID100
        AttrIdList(0) = NC_ATTR_COMM_TYPE
        AttrValueList(0) = NC_CAN_COMM_TX_PERIODIC
        AttrIdList(1) = NC_ATTR_BKD_PERIOD
        AttrValueList(1) = 10
        AttrIdList(2) = NC_ATTR_CAN_DATA_LENGTH
        AttrValueList(2) = 8
        AttrIdList(3) = NC_ATTR_CAN_TX_RESPONSE
        AttrValueList(3) = NC_FALSE
        AttrIdList(4) = NC_ATTR_RX_CHANGES_ONLY
        AttrValueList(4) = NC_FALSE
        AttrIdList(5) = NC_ATTR_READ_Q_LEN
        AttrValueList(5) = 0
        AttrIdList(6) = NC_ATTR_WRITE_Q_LEN
        AttrValueList(6) = 10
        Status = ncConfig("CAN0:TD0x100", 7, AttrIdList(0), AttrValueList(0))  ← ここの箇所でエラーになります
        If Status <> 0 Then 'NC_SUCCESS Then
            MsgBox "CANオープン前設定2エラー"
            nret = -1
        End If
    End If
    If nret = 0 Then
        Status = ncOpenObject("CAN0:TD0x100", TxHandleW1)
        If Status <> 0 Then 'NC_SUCCESS Then
            MsgBox "CANオープン前設定3エラー"
            nret = -1
        End If
    End If
End Sub

N.Mo さん
 このエラーはハードウェアが対応していない旨のエラーですね。
 USB-8473(s)使用時のエラー-1074388723に関して
 エラー番号がLabVIEWと違いますが、ダイアログに出ているHEX値が同一であるのと、
行いたい内容が一致しているので、結論としてはハードウェアが対応していない、ということになります。
 USB-847xシリーズで使用できるAPIは以下のリンク先に記してあります。
 Which NI-CAN Frame API Functions does the NI USB-847x Device Support?
 ハードウェアの機能が使用できないとなると、後はソフトウェアのタイミングで制御することに
なります。(もしくは外部のカウンタボードからトリガを受けて同期させて。。。少々面倒になりますね。)
 ご検討ください。

Similar Messages

  • Is is possible to access channels from a CAN database in labview with NI USB 8473s

    Hello,
    I would like to know whether is possible to access a CAN database, which is uploaded through MAX, in labview.
    More specifically, I have uploaded my CAN database in MAX and I want to have access to each specific channel in labview.
    i.e according to picture, I would like to have access  to n_Motor_InsRpm channel of E1_L0_1 (motor speed) in Labview, so I can set and transmit a speed value through CAN. Could that be possible with NI USB 8473 s? If yes, is there any simple example in Labview ?
    Thanks for your Help
    Charis
    Solved!
    Go to Solution.
    Attachments:
    CANdb.jpg ‏11 KB

    There are several ways to get database information without needing hardware. Here is one I did a while ago.
    https://decibel.ni.com/content/docs/DOC-39793
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How can I get a USB-8473 to work at 125kbps?

    All,
    I am using an NI USB-8473 high speed CAN card.  I've plugged in into a known-good CAN port in a network that works fine at 500kbps with other CAN devices.
    When I run the 8473 at 125Kbps, it works fine.  When I run it faster than that, it does not work.  It does not read CAN data, although the CAN LED does flash before an error (3FF6206B or other) is generated.  When I try to write to the bus at speeds above 125K, the device appears to attempt to write once, then stop functioning.
    Any help would be greatly appreciated.
    Thanks!
    Solved!
    Go to Solution.

    Although the network works with another interface at 500kbps, please check if your cabling meets the requirements for High-Speed CAN (page 4-4 of the NI-CAN Hardware and Software Manual).
    Do you use proper cable termination as mentionned at page 4-5 of above linked document ?
    Has the "know-good CAN port" an onboard 120 ohm termination resistor ?

  • Read CAN Interface of USB-8473 by programmation

    Hello,
    I'm looking for an example to obtain the CAN interface name of my card usb-8473. I've developped an application for colleagues and I don't know the CAN interface name they use (CAN0, CAN1, ...). It will be great if I could read this name in my application, to correctly set the object name of the CAN communication I'm configuring and opening.
    As joined, an example I've started but I cannot finish.
    Data location in MAX:
    I'm working with:
    LabVIEW 2012 SP1 (12.0.1f3), 32 bits
    MAX 5.4.0f0
    NI-CAN 2.7.4
    Thanks,
    Francis M | Voir mon profil
    Certified LabVIEW Developer
    Solved!
    Go to Solution.

    Find the attached code.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Device Identification Prototype.vi ‏15 KB

  • CAN USB-8473

    hi,
    im using the NI-CAN 8473 to communicate with the CAN bus on my car through an OBDII connector.
    im using for this the Automotive Diagnostic Command Set. I tried a simple code to get the supported PIDs in the car, but there was no communication between the CAN-USB and the car ECU.

    My understanding is that the Automotive Diagnostic Command Set works with all vehicles. To my knowledge this is a standard interface which works with all vehicles 2008 and later utilizing CAN. You can reference the SAE J1979 spec document/spec by googling. It will show you the standard CAN pins for all vehicles which should be the same (CAN+, CAN-, and gnd). This standard provides for the legislative pids which are mandated by the government so the guy on the corner garage can diagnose your trouble codes. Like when you go to your local Auto parts and the guy brings out his tester to tell you your trouble code and reset your engine on light. He's accessing the trouble codes and also the legislative pids. The transmit ID is normally 7E0 and the receive ID is 7E8. That's also in the spec.
    Now for my problem, I can't get the Automotive Diagnostic Command Set to work with my USB 8473s. I'm using the engine example that comes with the kit trying to measure RPM, TPS, and ECT on a 2010 Ford Escape. Here's my question:
    Should the Automotive Diagnostic Command Set work with Windows7 64 bit and LabVIEW 2010 32 bit?
    I installed it on my machine and it installed in the LabVIEW 2010 directory. I can't get it to work on any of the vehicles I tried. I have checked the wiring and confirmed the pinouts of the OBDII connector. The USB led is a steady yellow and the OBD lights flash green on the USB 8473s but the sofware hangs in the OBD Open.vi. I've checked with our CAN communication OBDII engineering team and confirmed the transmit and rcv adrresses. I have the baud rate set to 500K. Any help would be most appreciated! I've been told the toolkit is Plug & Play. Mine Plugs, but won't play!

  • Does NI-CAN (USB-8473) support programming in C#

    Hi there, I am developing software in C#, which supposed to test electronic devices (production of electronic manufacturing company), to ensure quality and functionality.
    My system consist of many NI devices, mainly Digital and Analog I/O, of them belong to DAQmx-group, and support programming in C#.
    Recently I added to the system CAN device USB-8473, which belong to NI-CAN-group (using my own terminology).
    Question is: Does NI-CAN provide support (classes, libraries, dll's, etc) for programming in C#?
    Thank you in advance

    Hi Chris, thanks for fast reply,
    yes, sure, I read this section of manual, just was thinking, this manual is from mid-2010, and meanwhile updated version of NI-CAN might be available, compatible with last generation of .NET, but it seems it is not.
    One more question: your Nican.dll is C++, unmanaged code library. To use it in .NET, particularly in C#, there must be some code which describe functions and variables packaged in this dll, to  provide translation (conversion) of functions and variables types, from C++ types to C# types, which would be very helpful for .NET programmers in using this dll. Something like:
            [DllImport("Nican.dll" , CallingConvention = CallingConvention.Cdecl)]
            public static extern int ncGetHardwareInfo(uint CardIndex, uint PortIndex, uint AttrId, uint AttrSize, ref uint  Attr);
            //instead of NCTYPE_STATUS _NCFUNC_ ncGetHardwareInfo(NCTYPE_UINT32 CardIndex, NCTYPE_UINT32 PortIndex, NCTYPE_ATTRID AttrId, .......
            public const int NICAN_ERROR_BASE   =        (int)(0xBFF62000);    // instead of #define  NICAN_ERROR_BASE (NCTYPE_STATUS)(0xBFF62000)
            public const int CanErrFunctionTimeout = (NICAN_ERROR_BASE | 0x001); // instead of #define  CanErrFunctionTimeout (NICAN_ERROR_BASE | 0x001)
    If you have code with this kind of conversion, would be very nice to have a link to that.
    Thank you for your help.

  • Mixed message lengths on CAN Bus using USB-8473 Device

    I am attempting to use the Frame API functions for LabVIEW
    and send both 11-bit and 29-bit headers over a bus that uses both address lengths.  I am currently successfully sending 11-bit
    packets but the 29-bit packets are having their addressing truncated to the 11-bit
    length when put on the bus.   
    As far as I can see I should have to set the standard
    comparator to 0xCFFFFFFFF and then send messages.  I am using a NI USB-8473 CAN Device for doing
    this.  Is there anything else I need to
    change for extended addressing?

    You need to OR your Extended ID with the 0x20000000 before giving it to the NCwriteNet.vi.
    This is the way that the underlying CAN driver and hardware know that is it an extended ID you are trying to send.
    The ID on the CAN bus will NOT have the ORed ID but only your ID. The driver/hardware filter the 0x20000000 from the ID.
    This is the same for reading an extended ID on the CAN bus. 
    Before using the ArbitrationId, you need to AND the ArbitrationId with 0x1FFFFFFF to filter the extended flag out. 

  • Labview misses a read when using Ni USB 8473 can interface

    I was wondering if anybody here has had experience with this problem... I already talked to a Labview tech but i have not received an answer yet...
    This is my problem..
    I have a program that  when a button is pressed, it initializes a can interface to CAN0 for example, then it writes... then it waits about 100mills and then it reads... My computer is connected to a simulator through the USB 8473 interface (I have the problem when I connect it to the hardware I am going to use), and everytime I write, this simulator sends a response... The problem is that sometimes I don't see a response... I have made sure that the simulator responds so I know it is responding... I have changed the waiting time before the read from 1 mills to 100 mills to 1 second, and still with the same result... 
    The way I have fixed this problem is by reading multiple times (3 times)... so every time I send a request, i wait 100 mills... then I read once, wait 25 mills, then read again, wait, then read again....
    So, I wanted to know if anybody here has had to do this in order to get around this problem...???
    The reason why I was asking this is because I also have another application that has to monitor my hardware by sending requests every 100 milliseconds... so I have two loops, once that writes requests every 100 mills... and another that reads the responses every 20 mills... but sometimes it looks like eventhough i read this many times, I still miss some frames, which are caught later but still not good enough...
    I have posted a different thread about the above problem...
    If you have questions just ask please...
    Thanks

    Yes, by Labview tech i meant NI Support... sorry about that...
    I am still waiting for them on this subject...
    I'll attach a simplified version of my code (the only difference between this code and the original is that i parse all the data that i get...)
    I am attaching these if a couple replys... 
    Run the receive and respond (simulator) then run the CAN_PROBLEM vi... click on the OK button to write then read... you can tell it missed the message when the Frames to Read field is 0...
     how are you sure that you device is sending a response?
    Very sure... 100%... the original simulator lets me know when it sends the response...
    Can you run bus monitor on another port, ie another USB-CAN device?
    I did that, and the other USB-CAN gets it... the program I am running on the other computer is called CANyliser... I think that program waits until there is something in the queue (which I am not doing with mine)... I am just reading after I have wrote teh message (reading after about 100 mills I wrote)... So I am assuming that's plenty of time... i have increased this waiting time to 1 sec and still get the same behaviour...
    Attachments:
    CAN_PROBLEM.vi ‏16 KB
    ReceiveAndRespond.vi ‏17 KB
    CAN INIT.vi ‏23 KB

  • NI-DNET or NI-CAN driver using USB-8473 to get a Devicenet communication

    Hi.
    I have a doubt regarding the proper driver to get a link between a Beckhoff BK5220 header and Labview, using USB-8473 interface.
    For this purpose, we are currently using a PCMCIA-CAN/2 card with NI-DNET1.41 driver and Labview 7.0, but our new laptops has been delivered without PCMCIA slot, so I have to find al alternative solution.
    I found the USB-8473 interface in NI Web. To operate with it We have to upgrade our Labview (it is not a problem) and upgrade at the same time the driver, but in the last version of NI-DNET driver, this hardware is still not supported.
    In the README of the last version of NI-CAN driver, it is supported, so, knowing that Devicenet protocol is actually a Can field bus protocol, and that we are currently using succesfully  a generic CAN PCMCIA card for this purpose,my question is:
    Could We use this hardware with this NI-CAN driver to get a link with a Beckhoff BK5220 using Devicenet protocol?
    Please let me know how I can solve it.
    Thanks in advance
    Best Regards
    Raul Gracia

    Hi Raul,
         You may find this KnowledgeBase interesting. Moreover, the following KB says "the user can implement DNET specifications using the NI-CAN Frame API". I encourage you to give a call to a National Instruments Internal Sales Engineer so that he can give you a hand with your hardware configuration .
         Regards,
    David Oña

  • Errors when using multiple USB-8473 devices

    I am trying to put together an application that uses five USB-8473 devices simultaneously on one PC. I can't seem to get more than two of them running without getting error -1074388956 (object handle invalid). Any two of them will run together, but when I go from two devices to three, I get the error every time. I have gone through and made sure that the object handles I am providing to ncReadNetMult are the same ones generated by ncOpen. Is there some limit to the number of these devices that can be run at the same time on one PC?
    It is not a USB issue (though they are all on the same powered hub) because I am only writing 4 frames/sec on each device and get the same issue without any modules attached.
    I need to run five at a time so I can talk to five modules with the same address at the same time.

    Marcus,
    Can you please clarify your comments regarding the USB hub? Specifically why you believe the hub is not part of the issue? I looked into the spec for the USB 8473 and these devices are rated at 250mA and 5VDC per module. Can you please check the rating of your hub? If you are trying to run 5 modules simultaneously, you will need the hub to output 1250mA to power all 5 modules. One of the common current output ratings is 500mA per hub - thus your ability to run only 2 modules.
    One way to eliminate the hub as the root cause is to try to connect multiple modules directly to your computer. I checked on my system and found that each of my 7 USB ports is rated at 500mA each. To check on your computer simply go to the Device Manager and expand USB Controllers. This will let you know how many internal "hubs" are on your system. When you right click on a hub, select "Properties", and click the "Power" tab, you will see the current rating of the ports assigned to that internal hub. If you have 3 (or more) available ports that meet the power requirements, then you should be able to test with three (or more) modules to see if the issue is present without the external powered hub.
    To me it sounds as though your hardware requires more current than the hub can supply.
    Kareem W.
    National Instruments
    Web Product Manager

  • How to change the baudrate for NI-USB 8473

    There is a problem about my NI-USB 8473, High speed CAN device.
    I have a excuted file to operate this CAN, programmed by CVI, but i dont have the source code. It works all fine when i want to change the baudrate.
    But i have to develop a new prj for this device, i use the function ncConfig to set the parameters of the can. I use a easy way that i get the CAN baudrate from the uir, a ring control.
    But things happened that the baudrate doesnt change at all. I dont know what is going on, is there any other functions can set the baudrate? And when i use ncConfig, the parameters are totally cool, without mistake.
    And anther question, how to asign CAN dynamically, i mean how could i  creat any new CAN control panel for a new can as i want, because i have one to control one CAN, but now i need to control several undetermined number of CANs, should i creat a new panel for each of them or just modify the CAN names for the orginal one?

    You can use the structure of labview examples for your CVI program. I had started NI Spy parallel when using labview example - so it shows you the functions you can use in same way in CVI - hope it helps. You can attach here your program because i not known what example (*.exe) do you use for CVI  ?
    For creating CVI source project you could use the links i sent you before:
    http://forums.ni.com/ni/board/message?board.id=30&message.id=3640&requireLogin=False
    http://digital.ni.com/public.nsf/allkb/F997E364CFAA63F6862573540064C028?OpenDocument
    http://digital.ni.com/public.nsf/allkb/E1A44077DA6C819186257288006B76D7

  • USB-8473s Bus Monitor Won't Start

    Hello
    I have an 8473s USB CAN module I am trying to get working.
    I have MAX 5.5 and CAN 2.7.5 on Windows 7
    The 8473s sometimes starts with a nice yellow USB light, sometimes with one that flashes green-yellow, sometimes one that flashes in a pattern yellow two short two long (I think, it's been a while since this one happened and I didn't take good notes on the pattern)
    I can expand Devices and Interfaces, and then NI-CAN Devices, and then USB-8473s. Then in the right pane I click on Bus Monitor. And that's the last thing I can do before I have to task kill MAX.
    Sometimes I am able to Self Test the unit, sometimes not. Bus Monitor used to take a long time then pop up a confusing message: "NI-CAN: (Hex 0xBFF62103) The firmware of the CAN or LIN hardware no longer responds to commands from the Windows driver, usually due to frequent CAN/LIN or timer interrupts. Solution: For CAN, use comparator/mask (filter) properties to reduce received trafic." After that the Bus Monitor would show it's user interface, but if I tried to Start, it would go Not Responding and never come back (or at least not after a half an hour).
    I have two 8473s units, and both respond the same. I have tried different USB ports with no difference. I have tried to repair the CAN 2.7.5 driver, and it did not help.
    What else should I do to get Bus Monitor to work?
    I wish I had a PCI CAN interface. I don't trust the USB.
    Thanks
    Keith

    Thanks for the input.
    The machine that is the subject of the original post is the customer equipment. It is an Advantech industrial PC.
    I tried it on my development system, a Lenovo Laptop, and it works perfectly.
    My current best guess is an incompatibility with the Advantech, some kind of motherboard driver or USB thing. Ugh.
    Unfortunately at the moment there's a different fire pulling me away for a little bit here.
    I did get an "nicanerr.txt" dump, if it is useful:
    [OSINFO_SECTION]
    OS=Workstation
    Service_Pack=Service Pack 1 (Build 7601)
    [DRIVER_VERSION_SECTION]
    NICAN.DLL_VERSION=12.6.2f3
    NICANFRM.DLL_VERSION=12.6.2f3
    DRIVERS\NICANPK.DLL_VERSION=12.6.2f3
    NICANPU.DLL_VERSION=12.6.2f3
    NICANTSK.DLL_VERSION=12.6.2f3
    NICANCFQ.DLL_VERSION=2.6.0f0
    NCVI.DLL_VERSION=2.7.4.12288
    NICAN_S1.NFW_VERSION=2050300
    NICAN_S2.NFW_VERSION=2050300
    [CURRENT_SECTION]
    Section_Index=5
    [INDEX_0]
    Local_Time=
    Err_Status=
    Function=
    [INDEX_1]
    Local_Time= 11/13/2014 16:46:27.130
    Err_Status= Status:0xb1080002-Location:0x30000000-Internal:0x01080000
    Function= ncConfig-CAN0
    [INDEX_2]
    Local_Time= 11/13/2014 16:47:47.131
    Err_Status= Status:0xb1080002-Location:0x30000000-Internal:0x01080000
    Function= ncConfig-CAN0
    [INDEX_3]
    Local_Time= 11/13/2014 16:49:07.132
    Err_Status= Status:0xb1080002-Location:0x30000000-Internal:0x01080000
    Function= ncConfig-CAN0
    [INDEX_4]
    Local_Time= 11/14/2014 08:49:01.922
    Err_Status= Status:0xb1340103-Location:0x30000000-Internal:0x01340000
    Function= ncAction-CAN0
    [INDEX_5]
    Local_Time= 11/14/2014 09:02:41.046
    Err_Status= Status:0xb2e70002-Location:0x30000000-Internal:0x02e70000
    Function= ncConfig-CAN0
    Thanks again
    Keith

  • Ni-usb 8473 linux

    To all,
    Could a ni-usb 8473 be used in a linux machine?
    - Cosmica
    Message Edited by Cosmica on 11-04-2008 09:48 AM
    Solved!
    Go to Solution.

    Hi,
    Unfortunately, there is currently no CAN driver for Linux OS.  I have
    already put in a product suggestion for this on your behalf, and I would
    encourage you to do the same here. 
    I apologize that this functionality is currently unavailable for this
    device.  Have a great day!
    Regards,
    Todd V.
    National Instruments
    Applications Engineer
    NI Prototyping Community

  • NI USB-8473 사용중 ncConfig() 함수에서 오류(-1074388723)발생합니다

    안녕하세요.
    NI USB-8473 사용중 ncConfig() 함수에서 오류(-1074388723)발생합니다.
    NI PCI-CAN Series2 보드를 사용했을 때 적용한 프로그램인데
    NI USB-8473 로 교체했을 때 읽기는 되는데 쓰기가 안됩니다.
    첨부파일에 오류가 발생하는 곳의 위치를 표시했습니다.
    사용하는 프로그램은 VB6.0 입니다.
    원인을 알수 있을까요? 수정방법도 ... 부탁합니다.
    Attachments:
    00.JPG ‏160 KB

    The NI USB-8473 does not support NI-CAN Objects. It is limited ot Network Interface support only.
    http://digital.ni.com/public.nsf/allkb/7A7875C000F205DD862572640073B8CF

  • Synchronise NI 9239 & NI USB 8473 with Signal express

    Hello, I have a Cdaq 9174 chassis with an NI 9239 module (analogue input at 50Khz/ch) with Signal Express.
    And I wanted to know if we could acquire this four inputs synchronised with datas from CAN connection by using a NI USB 8473 ?
    Many thanks.
    Patrick.

    For me you can't use the driver NI-CAN is not compatible with Signal Express. The Only way you could use it with SE, is to pass through LabVIEW VI.
    You'll find in the below link the way to do it.
    http://digital.ni.com/public.nsf/allkb/359D14941D6936E98625729D008387D5
    I advise you to stay in LabVIEW this kind of program. It's easier.
    Best regards.
    Sabri JATLAOUI - Certified LabVIEW Developer

Maybe you are looking for