12-11-2013
11:19 AM
- last edited on
02-26-2024
11:40 AM
by
migration-bot
NI-CAN: (Hex 0xBFF62024) The object handle (ObjHandle) is invalid.
Solutions: Verify that the Open function succeeded;
Verify that you did not close the handle in another thread of execution (such as with ncReset).
I have two NI USB-8473 hooked up to a CAN Breakout Box with NI Single Terminal CAN Cables and an NI USB Digital I/O Power Supply.
The USB cable part of the NI USB-8473 is hooked to my PC's USB ports and are CAN0 and CAN1.
I am running modified version of:
"C:\Users\Public\Documents\National Instruments\NI-CAN\Examples\MS Visual C\Frame API examples\CAN Receive\CAN Receive.c"
and
http://ftp.ni.com/pub/devzone/epd/transport_protocol_8.6_2v.zip
J1939 NI CAN Frame Example.vi
I ran
NIMax.exe
and did a test on the two NI USB-8473 and they passed.
Below are the settings for the two NI USB-8473's:
My System Devices and Interfaces NI-CAN Devices USB-8473 CAN1 Interface Name: CAN1 Location: Port 1 Transceiver: High-Speed Transceiver Name: Philips TJA1041 Baud Rate: 125.000 kBaud Sample Point: 87.5% BTR0: 0x03 BTR1: 0x1C
USB-8473 CAN0 Interface Name: CAN0 Location: Port 1 Transceiver: High-Speed Transceiver Name: Philips TJA1041 Baud Rate: 125.000 kBaud Sample Point: 87.5% BTR0: 0x03 BTR1: 0x1C
When I run LabView
"J1939 NI CAN Frame Example.vi"
and click run, Then select CAN1, Then set buad to 125000, then click the send button.
I see the CAN green light on the USB-8473 turn on then off for about 1/3 second.
Then I run the "c" code which reads CAN0 at 125000 baud. The ncConfig works. The ncReadMult call fails with 0xBFF62024. The ncStatusToString generates the "NI-CAN: (Hex 0xBFF62024) The object handle (ObjHandle) is invalid." error message from the 0xBFF62024 Status.
It was woking last week but now I keep getting the above message.
When I was running the LavView .vi file I would sometimes forget to click stop. If I just clicked "x" in the lavView before clicking Stop. I would get a bunch of errors and couldn't get it to run without errors. To fix this, I would unplug the two USB connectors and plug them back in and that would make future runs work.
Any help in getting this to work without the 0xBFF62024 error from calling ncReadMult is appreciated.
Thanks.
--------------- Also, ---------------
C:\Users\Public\Documents\National Instruments\NI-CAN\Examples\MS Visual C\Frame API examples\CAN Receive\nicanmsc.lib
I was trying to make a x64 version so I can use Java JNI and the can library on an x64 machine with x64 Java.
Do you know if there is a 64bit version of nicanmsc.lib?
12-11-2013 11:22 AM
NI-CAN: (Hex 0xBFF62024) The object handle (ObjHandle) is invalid. Solutions: Verify that the Open function succeeded; Verify that you did not close the handle in another thread of execution (such as with ncReset). I have two NI USB-8473 hooked up to a CAN Breakout Box with NI Single Terminal CAN Cables and an NI USB Digital I/O Power Supply. The USB cable part of the NI USB-8473 is hooked to my PC's USB ports and are CAN0 and CAN1. I am running modified version of: "C:\Users\Public\Documents\National Instruments\NI-CAN\Examples\MS Visual C\Frame API examples\CAN Receive\CAN Receive.c" and http://ftp.ni.com/pub/devzone/epd/transport_protocol_8.6_2v.zip J1939 NI CAN Frame Example.vi I ran NIMax.exe and did a test on the two NI USB-8473 and they passed. Below are the settings for the two NI USB-8473's: My System Devices and Interfaces NI-CAN Devices USB-8473 CAN1 Interface Name: CAN1 Location: Port 1 Transceiver: High-Speed Transceiver Name: Philips TJA1041 Baud Rate: 125.000 kBaud Sample Point: 87.5% BTR0: 0x03 BTR1: 0x1C USB-8473 CAN0 Interface Name: CAN0 Location: Port 1 Transceiver: High-Speed Transceiver Name: Philips TJA1041 Baud Rate: 125.000 kBaud Sample Point: 87.5% BTR0: 0x03 BTR1: 0x1C When I run LabView "J1939 NI CAN Frame Example.vi" and click run, Then select CAN1, Then set buad to 125000, then click the send button. I see the CAN green light on the USB-8473 turn on then off for about 1/3 second. Then I run the "c" code which reads CAN0 at 125000 baud. The ncConfig works. The ncReadMult call fails with 0xBFF62024. The ncStatusToString generates the "NI-CAN: (Hex 0xBFF62024) The object handle (ObjHandle) is invalid." error message from the 0xBFF62024 Status. It was woking last week but now I keep getting the above message. When I was running the LavView .vi file I would sometimes forget to click stop. If I just clicked "x" in the lavView before clicking Stop. I would get a bunch of errors and couldn't get it to run without errors. To fix this, I would unplug the two USB connectors and plug them back in and that would make future runs work. Any help in getting this to work without the 0xBFF62024 error from calling ncReadMult is appreciated. Thanks. --------------- Also, --------------- C:\Users\Public\Documents\National Instruments\NI-CAN\Examples\MS Visual C\Frame API examples\CAN Receive\nicanmsc.lib I was trying to make a x64 version so I can use Java JNI and the can library on an x64 machine with x64 Java. Do you know if there is a 64bit version of nicanmsc.lib?
12-11-2013 12:24 PM
I solved one of my problems. I deleted the ncOpenObject lines by mistake after the ncConfig lines. --- /* open the CAN Network Interface Object */ Status = ncOpenObject(Interface, &NetIntfObjhRx); if (Status < 0) { PrintStat(Status,"ncOpenObject"); } --- I put these lines back in and it is working again. :) I still need a x64 bit version of nicanmsc.lib so I can us the can code and JNI with java 64 bit version. Is there a nicanmsc.lib for x64? Thanks
12-12-2013 01:29 PM
At this time, there is not a 64 bit version of nicanmsc.lib. The code can still be run on a 64 bit machine but it must be compiled for a 32 bit processor.
01-06-2023 11:44 AM
Hello, I know this is a very old post, but is 64 bit version of nicanmsc.lib still unavailable?
Thank you!
01-06-2023 12:22 PM
NI has never, and likely will never, release a 64 bit version of NI-CAN. You can still make LabVIEW applications in 32 bit LabVIEW, then build them into EXEs and installers, then run those on 64 bit versions of Windows just fine.
The better route is to use XNet hardware and software, which does work in LabVIEW 32 or 64 bit. But if you must use NI-CAN hardware, then you must use 32 bit LabVIEW.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord