10-12-2009 03:49 AM
Hi !
I have another question... I need to do specific CAN operation for example have a specific flag, or calculate a checksum on a frame .... I know the solution will be to create a custom device with these function. But if i create a custom device to handle CAN , i will also have to re create the function to import dbc, configure ports ...
My question is : is it possible to make some modification in the CAN without having to re developp all CAN functions ??
10-12-2009 04:00 AM
Hi.
The source code is compiled into the executables on the host and on the RT target.
There is a way to relink to the import DBC file code from your custom device, but there is no way to change the CAN transmit code in the executable.
Do you use NI-XNET devices at all?
If so, there is an open source implementation available:
http://zone.ni.com/devzone/cda/epd/p/id/6298
Please let me know if this works for you.
Thanks,
Tom
10-13-2009 10:31 AM
Hi ThSa,
Well, I tryed to use the NI-XNET custom device, but i have some problems:
1) When I add the custom device, i can choose, the interface type, the interface, the XNet Database... In the combo i have "nixnet_example", and it's impossible to change this value. When i select "browse for database file..." nothing happens.
2 ) After tha, when the custom control is inserted, a popup appears : "Error -1074384541 : you used an empty name for the XNET Database." This message appear each time i click on the CAN node.
3) Finally, It's impossible to delete this custom device. When i click on the delete button (on the top left) nothing happens. I have to quit the project without saving the modifications.
Any idea ...?
10-13-2009 11:16 AM
Hello KaBooOoom,
What do you mean by "nothing happens" when you click browse for database? You should have a popup window that lets you browse your hard drive for a database file.
When you browse for a database file, you select a database, and click ok. The IO control is not populated with your new database. You have to click on the IO control (the ring with the database names) and select your newly added database.
You can also open the NI-XNET database editor (Start -> All Programs -> National Instruments -> NI-XNET) and open your database from there. You can also create a new database, or edit the existing one. That should also add an alias that will be displayed in the ring control of the custom device.
Let me know if any of this helps. Have a great day.
10-14-2009 02:21 AM
Hi !
"Nothing happens" means, that no popup appears. I thought I could choose a .dbc present on my drive from here...
Finally i used the NI-XNET database ditor, and i imported the dbc. After that i created the NI XNET custom device, and now, i can see my database in the ring control.
I think the points 2 and 3 arised because i wasn't able to choose a database... But it still weird...
10-14-2009 04:42 AM
Hi
Ok, it was my fault, i had an old verison of the NI XNET driver installed ... (beta 2 ) . I downloaded the last version, and now it seems to work...
10-14-2009 07:50 AM