12-19-2013 03:50 PM
Hello, I am trying to implemate a comunication with CAN using the NI 9853 with a CRIO and I am using this example, as a guide:
But I need more info to really understand how it works, because there are several things I dont get from the example, like the input and output channels names, I dont know what I have to put in there, because I only want to read and I only know the IDS of the incoming messages that are a number of 11 bit (because I want to comunicate using CAN 2.0 A), so I dont know, if I put a hexadecimal number corresponding to the ID in the input Channel name it will work or not.
If you have any example or documentation for a simple way to implement this kind of comunication please post it 🙂
12-20-2013 02:00 AM
as can be seen be the first picture on the linked page you need to supply a "CAN database file". That database contains the message and signal names of your CAN messages. By using such a database you define IDs and bit positions/lengths for all relevant signals you need to transfer...
01-07-2014 09:29 AM
Thank you, but how do I create a CAN database file? For example I attached a image of the structure of the messages I receive, how will be the database file for this case?
01-07-2014 09:33 AM
I'm using the CANdb++ Editor from Vector (www.vector.com) to create dbc-files...
01-07-2014 10:15 AM
thank you!, Do you have an example of a database .dbc?
01-07-2014 04:48 PM
I don't want to send you down another path if you are making progress, but an alternative method is to read the data on the bus as Frame data not Signal/Channel. This way you get the raw data with the ArbID and Payload. You then need to do the work to understand what was read. A CAN database is used to help read and scale the CAN data for you but in some cases you don't really care and just want to see raw data and in that case you don't need a database.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
15 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-08-2014 09:49 AM
I have another question about how to use the database, because the module "host conversion init" need the "input channels", here I put the name of the messages that I defined on the CANdb++, or I need to put the name of the signals that constitute the messages, that I defined. :S
01-08-2014 12:19 PM
I found an example of a .dbc file, is included in the next example:
its name is demobox.dbc
is suppose to be the same as the file used in the first example referenced:
But the thing that I dont get is, why does the input channels are as Tx messages, I thought it must be as Rx messages, also, the output of the module "host conversion read" is an array of doubles, even though the referenced channels are of lower size, like 16 or 8 bits in some cases, I my case I need to treat this outputs of 8 bits as binary, but I cant because the output is in double and the only solution I think of is to set a signal name, to every bit that I need to treat.