I import .dbc file to the J1939 Manager and map the variables inside of it. Then I add a message to the dbc file and again I want to update dbc file on the codesys project side. But there is no update option. If I import again then my mapping settings are gone. Do you know how to update dbc without loosing mapping part?
Thanks in advance,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again everyone.
I think I solved the problem. You can "export mappings to CSV" feature when you mapped your variables inside of the ECU node. Then after you imported new dbc, you can right click to the ECU and click "import mappings from CSV" feature. Then your old mappings will be there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Which version of codesys you are using? In order to import dbc file, I guess your version should be at least SP17. Otherwise you cannot see "import dbc" feature.
If you are using lower version of codesys mandatorily, then you can download sp17 free and import your dbc there. then copy and paste to your main project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what you propose seems to be precisely what I need. I work with SP10 and am troubled with setting up some nodes, for which I only have .dbc files. If I understand you correctly I could:
Download SP17
Read the .dbc file into a project in SP17
Copy the generated setup to my SP10 project
Correct? Does the fact that I copy code from a never version into an older environment not create any issues?
Thanks a lot! Kind regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But keep this in your mind, when you setup the newest version of codesys, it is pulling the latest library which you installed your computer, automatically.
If you are working with lower patch like SP10, then you need to change effective version of the libraries as lower or equal to the patch you used. (you can change this via placeholders tab which is next to the effective versions in Library Manager section)
If you have more question, please ask.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So when I use SP17 to load the .dbc file in, the CAN adapters etc. should actually be SP10 or older, such that I can then copy and use them within my original project running on SP10? Is that what you mean?
So there is no point in reading the .dbc files into a CAN adapter of version SP17, as it won't then run on any older version, right?
Thanks and kind regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1-Set up SP17
2-Create an empty project and add J1939 or CANopen manager (whatever you use) to it.
3-Import your .dbc file to this manager.
4-After than open your SP10. And Copy manager from SP17 and paste it to your project on SP10.
5-You can see some library errors. If you see go to the library manager on SP10 and change effective versions if you see higher version than SP10.
If you cannot rebuild without error, please write here, than I can help further.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks a lot! I tried, but didn't get very far. One device I am trying to set up runs on CAN 2.0B /ISO 11898-1: Baudrate:500Kbps. Another I also tried runs on 2.0A or 2.0B (extended identifier), but neither works.
I set up SP17, created an empty project and added a J1939 manager. Then I pressed "Import DBC file", selected the DBC file and clicked "OPEN". Then a small window "DBC content selection" pops up. There I can choose if I want to import a particular module or not, and whether it is a Local ECU or not. I click "OK" and the selected modules are added below the J1939 manager. Problem is they are empty. They are the same as if I manually add a J1939_ECU below the manager.
Would you have any idea why it doesn't actually set up the frames as defined in the DBC file?
Thanks and kind regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could you please send secreenshots of the dbc file. IF you mixed standards with one dbc file, maybe it can cause a problem when you want to import it. As far as I understood, it seems dbc file problem, instead of codesys.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked your dbc file and it is not J1939 standard. That's why you cannot see anything below j1939 manager. I guess you should add CANopen manager and import csv file of this dbc file. Because with CANopen Manager, there is no option to import dbc file.
I hope I could explain well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks a lot! So if I convert the .dbc file into a .csv file, I will be able to set up the node automatically by solely reading the .csv file into Codesys, into a CANopen Manager?
Best regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi never-settle,
I have never tried import .csv file to the CANopen manager but I guess it works. But I am pretty sure you need to use CANopen manager, because your messages standard is CANopen.
1-Convert your dbc file to csv file.
2-Add CANopen manager to your project.
3-Import this csv file to the manager.
I hope this will work. If you have any question yo can ask. Or if you cannot do, send me csv file and I can try for you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes, CANopen makes sense, as device 1 cannot handle J1939. I think the common thing with the setup of CANopen will be the use of an EDS file. I've done this several times without problems. CSV I have no experience. So I think the problem comes down to converting the two DBC files into EDS files, which I have yet to figure out.
Thanks and kind regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please may you assist, I have followed your instructions and copied the manager over but cannot change the versions to get rid of the library error. Please see attached picture
Hello All,
I import .dbc file to the J1939 Manager and map the variables inside of it. Then I add a message to the dbc file and again I want to update dbc file on the codesys project side. But there is no update option. If I import again then my mapping settings are gone. Do you know how to update dbc without loosing mapping part?
Thanks in advance,
Hi again everyone.
I think I solved the problem. You can "export mappings to CSV" feature when you mapped your variables inside of the ECU node. Then after you imported new dbc, you can right click to the ECU and click "import mappings from CSV" feature. Then your old mappings will be there.
Hi BY,
Could you tell me how you imported your DBC file? I have one to import but I can't find how to import it into my instance of Codesys!
Cheers,
John
Hi johnhastech,
Which version of codesys you are using? In order to import dbc file, I guess your version should be at least SP17. Otherwise you cannot see "import dbc" feature.
If you are using lower version of codesys mandatorily, then you can download sp17 free and import your dbc there. then copy and paste to your main project.
Dear BY,
what you propose seems to be precisely what I need. I work with SP10 and am troubled with setting up some nodes, for which I only have .dbc files. If I understand you correctly I could:
Correct? Does the fact that I copy code from a never version into an older environment not create any issues?
Thanks a lot! Kind regards,
Stefan
Hi never-settle,
Yes you understood correctly.
But keep this in your mind, when you setup the newest version of codesys, it is pulling the latest library which you installed your computer, automatically.
If you are working with lower patch like SP10, then you need to change effective version of the libraries as lower or equal to the patch you used. (you can change this via placeholders tab which is next to the effective versions in Library Manager section)
If you have more question, please ask.
Dear BY,
thanks a lot for your quick response!
So when I use SP17 to load the .dbc file in, the CAN adapters etc. should actually be SP10 or older, such that I can then copy and use them within my original project running on SP10? Is that what you mean?
So there is no point in reading the .dbc files into a CAN adapter of version SP17, as it won't then run on any older version, right?
Thanks and kind regards,
Stefan
Hi never-settle,
Please follow steps:
1-Set up SP17
2-Create an empty project and add J1939 or CANopen manager (whatever you use) to it.
3-Import your .dbc file to this manager.
4-After than open your SP10. And Copy manager from SP17 and paste it to your project on SP10.
5-You can see some library errors. If you see go to the library manager on SP10 and change effective versions if you see higher version than SP10.
If you cannot rebuild without error, please write here, than I can help further.
Dear BY,
thanks a lot! I tried, but didn't get very far. One device I am trying to set up runs on CAN 2.0B /ISO 11898-1: Baudrate:500Kbps. Another I also tried runs on 2.0A or 2.0B (extended identifier), but neither works.
I set up SP17, created an empty project and added a J1939 manager. Then I pressed "Import DBC file", selected the DBC file and clicked "OPEN". Then a small window "DBC content selection" pops up. There I can choose if I want to import a particular module or not, and whether it is a Local ECU or not. I click "OK" and the selected modules are added below the J1939 manager. Problem is they are empty. They are the same as if I manually add a J1939_ECU below the manager.
Would you have any idea why it doesn't actually set up the frames as defined in the DBC file?
Thanks and kind regards,
Stefan
Hi never-settle,
Could you please send secreenshots of the dbc file. IF you mixed standards with one dbc file, maybe it can cause a problem when you want to import it. As far as I understood, it seems dbc file problem, instead of codesys.
Dear BY,
thanks a lot! The .dbc file causing the problem can be downloaded from https://app.box.com/s/vf9259qlaadhzxqiqrt5cco8xpsn84hk/folder/134048861771
Thanks and kind regards,
Stefan
Hi never-settle,
I checked your dbc file and it is not J1939 standard. That's why you cannot see anything below j1939 manager. I guess you should add CANopen manager and import csv file of this dbc file. Because with CANopen Manager, there is no option to import dbc file.
I hope I could explain well.
Dear BY,
thanks a lot! So if I convert the .dbc file into a .csv file, I will be able to set up the node automatically by solely reading the .csv file into Codesys, into a CANopen Manager?
Best regards,
Stefan
Hi never-settle,
I have never tried import .csv file to the CANopen manager but I guess it works. But I am pretty sure you need to use CANopen manager, because your messages standard is CANopen.
1-Convert your dbc file to csv file.
2-Add CANopen manager to your project.
3-Import this csv file to the manager.
I hope this will work. If you have any question yo can ask. Or if you cannot do, send me csv file and I can try for you.
Hi BY,
yes, CANopen makes sense, as device 1 cannot handle J1939. I think the common thing with the setup of CANopen will be the use of an EDS file. I've done this several times without problems. CSV I have no experience. So I think the problem comes down to converting the two DBC files into EDS files, which I have yet to figure out.
Thanks and kind regards,
Stefan
Hello BY.
Please may you assist, I have followed your instructions and copied the manager over but cannot change the versions to get rid of the library error. Please see attached picture