11-20-2009 07:18 PM
Bill,
Thank you again for your detailed reply. Per your advice, I wrote a support request and received the reply today. Since it has benefits for others reading this forum and since I did not wish to take up more of the Application Engineer's time, I decided to post the relevant portion of the reply here:
This is currently not a feature available in MAX. I have filed a product
suggestion on your behalf in order to get this added to MAX, but this
doesn't guarantee that it will happen and if it does it will be a while
before it is a customer accessible feature.
While I think that LabVIEW is a programming language that you can greatly
benefit from if you are not interested in purchasing it you can make a call
to the DLL ncSetAttr using the following syntax: int32_t ncSetAttr(uint32_t
ObjHandle, uint32_t AttrId, uint32_t Data); just like the LabVIEW VI does
for you.
Of course, not being a programmer myself, I have no idea what the second paragraph above is suggesting. How does one "make a call to the DLL ncSetAttr"?
In my original support request I also asked what the default termination is for the 8472. Unfortunately, that was not answered at all by the Applications Engineer. (My guess is that it is probably the 1.11k-ohm resistance.)
Best,
James
11-22-2009 08:33 PM
James:
I'm not sure what you told NI but it looks like you don't plan to use LabVIEW to read the CAN messages you were looking for in your original thread. The referenced library call
"
int32_t ncSetAttr(uint32_t
ObjHandle, uint32_t AttrId, uint32_t Data)
"
would allow you to set the same values listed in the NI CAN Reference manual using a language like C or C++ that you would set a lot more easily if you were to be using LabVIEW. I'm not a C or C++ programmer so I can't be much help to you with that. The values you need to set are defined and described in the manual, though, so if you have a C programmer you are working with you could have them write something that would do it, but unless you are putting your entire application together in C or C++ it won't help you use MAX. There are a lot of programmers that work with LabVIEW and with the NI API for NI CAN so perhaps you could find someone that could put something together for you. I would start with the Alliance members listed on NI.com if you decide to have someone do it for you. Sorry I can't be much more help.
I can tell you that the default termination for the 8472 is 1.11 K ohm, though. That fact is listed on page 475 of the NI-CAN HArdware & Software Manual.
Bill
06-14-2010
12:29 PM
- last edited on
06-15-2010
09:55 AM
by
Support
Hi,
I would like to contact Mr. Bill_in_Detroid to make to him some technical questions and take please possibly from Him some advices.
I plan to buy from NI a set of hardware and software for communicating and diagnostic purposes Personal Computer with Car On Board Computer.
Please Mr. Bin_in_Detroid I would like to contact to You as I have seen from forums that You are an expert for communicating through NI instruments – Interface - personal computer - to car computer.
I trust Your advices so please I would like to have your e-mail address.
(I am writing here as I do not know where to find Your address for communicating )
Best Regards
06-14-2010 12:55 PM
Nike: Any questions you have I would prefer to answer here on the forum so everyone can benefit. In fact, you should start by posting your question to the forum so that the answers are not limited to this topic. As I write this there are over 300 members on-line so you have a good chance of getting a faster response to your question than you would waiting for me, as I am only on here on an occasional basis.
06-15-2010 10:55 AM
What equipment should I bye from NI, in order to comunicate let say with on board computers cars made from year 2000?
06-16-2010 03:27 PM
Hello Nike,
What protocol will you be using? CAN, LIN?
Here is a good start to get more information:
Thanks,
Anna K.
08-25-2010 03:31 AM
Bill, I wanted to post a follow-up to what you and I spoke about in this thread last November. I actually get a single Error Frame when using the USB-8473 @ 500kbps on a Toyota car (which is definitely a 500kBaud bus). The single Error Frame almost always appears just after I turn on the Ignition:
01 00 00 7A
Indeed, if I enable the "Stream to Disk" function in MAX's "Options," I can leave the Ignition switched on, and over the course of several minutes, several text files named Stream 0, Stream 1, Stream 2, and so on will appear (each 1MB in size), and when I search all of those files, I usually can only find a single instance of the Error Frame in the Stream 0 file. (I tested the car with all doors closed, running my cables through an open driver's side window, testing only by turning the Ignition ON or OFF.)
My cable (measured from the tip of the 9-pin D-SUB to the tip of the OBD2 connector I use at the other end is 99cm (just under 1m), so as you said before, I shouldn't have to use a 120-ohm terminating resistor across CAN-H & CAN-L. Even so, I put the 120-ohm resistance (measuring it first to ensure I was right) across the CAN wires (at the end of the cable closest to the OBD2 connector) and then tested again. I still get the same Error Frame when turning on the ignition.
I then hooked up a digital scope, setting SEC/DIV to 2.5us as you directed, with the CH1 probe on CAN-H and the CH2 probe on CAN-L, viewing both CAN-H & CAN-L signals separately on the scope screen. Without the 120-ohm terminating resistor, I could see the bits fine when I played with the Trigger Level adjustment. With the 120-ohm resistor across CAN-H/L, I could still see the bits, although there was much more signal ghosting on my scope screen when I did added it. On the scope, CAN-H exactly mirrored CAN-L, with CAN-H rising as high as 1.8v and CAN-L going as low as 1.8v.
There were occasions with my scope hooked up that I got as many as 16 Error Frames back-to-back, which appeared as follows:
Error Frame 5.7059 01 00 00 7B
Error Frame 5.7059 01 00 00 77
Error Frame 5.7064 01 00 00 7B
Error Frame 5.7064 01 00 00 77
Error Frame 5.7069 01 00 00 7B
Error Frame 5.7069 01 00 00 77
etc.
Not sure what all this means, or if my "single" Error Frame is anything to worry about. But I wanted to report it nonetheless.
Thank you.
Bill_in_Detroit wrote:
James:
In response to what you would look for using a scope:
High Speed CAN is a differential voltage logic system. When the signal is recessive, the signals on CAN_H and CAN_L are roughly equivalent at a value of about 2.5 volts DC relative to ground. When the signal goes dominant, the CAN_H rises to about 3.5 volts DC and the CAN_L drops to about 1.5 volts DC, giving a net differential voltage of about 2.0 volts DC during the dominant bit. A discussion of this and about termination can be found in the Microchip document number AN228 which can be found at this link -> CAN Physical Layer.
What you would look for with a scope is that the voltages can be clearly seen at these levels during message traffic. Most of the problems that I have seen have shown up pretty quickly on a scope. First of all, you should use a scope with sufficient bandwidth so you can actually see the bit levels change. If termination is incorrect, you will not be able to get a lock on a message as the reflected signals will overwrite each other to some degree and the signal will look like noise to a large extent. For high speed CAN at 500 Kbps, if you set your scope in the 2 or 5 us range you should be able to see the bits clearly.
Good luck with your project. There are other tools on the market that may work better for your purpose than trying to write something on your own, but as this is the NI forum I won't go into that here without first clearing it with NI.
10-19-2010 02:40 AM
After many months of searching in vain for an answer about the Error Frames I reported before, I finally received the answer from an engineer experienced with CAN-BUS:
Error Frames using NI-CAN tools are absolutely normal in an automotive CAN-BUS network where all the units connected on the network go into stand-by or sleep mode. If all units are sleeping (to reduce power consumption), and one wakes up for an external event, for example receiving RKE commands, it tries to send a message on the CAN-BUS but the other devices are still sleeping too and are not able to wake up immediately, and therefore they can’t understand the digital message being sent. There is always a delay from a first falling-edge of the Start Bit of the message (when the other units wake up) due to the clock starting and CAN register reconfiguration.
And so, the first device that sends a message during CAN sleep won't receive an acknowledgement and therefore the sending device puts Acknowledgement Error on the bus. Remember that whatever device sends a message on CAN-BUS also sends an ACK bit in a recessive state, and the receiving node must switch this bit in the dominant state, otherwise an ACK error is generated by the sending device.
To confirm this you can first check if the error frame appears just when the bus wakes up. Try enabling the NI-CAN tool to send the ACK by removing “listen only” tick mark in MAX. This way the NI-CAN tool is always ready to acknowledge a message. Of course, it's important to use Listen Only mode during your automotive data acquisitions to avoid any unnecessary influence on the vehicle's bus.
I hope this information can be of help to other who find this thread.
04-08-2014 09:35 AM
I recently got NI USB 8472 Low speed can message module and i am trying to read CAN message from GMLAN.
I am confused with the connection for that, USB 8472 has pin 7 as CAN_H, Pin 2 as CAN_L. My ECU side has GMLAN and Ground. How do i make connection here? Also Do i need to use any resister 120 Ohms?? My third question is... I am assuming IF i open NI MAX, CAN0 bus monitor,i should be able to read some message from Automotive ECU? Can some one help me with it Plz.. Thanks in advance.
04-08-2014 11:55 AM
GMLAN defines their physical layers different from the rest of the industry
High-Speed, which corresponds to High-Speed CAN
Medium-Speed, which correponds to Low-Speed/Fault Tolerant CAN
Low-Speed, which corresponds to Single-Wire CAN
NI USB CAN/LS would correpond to the GM-LAN Medium Speed. The only interfaces from NI with single-wire CAN are PCI/PXI Software-Selectable (XS) interfaces.