Help with CAN
Help with CAN
Hello,
I can not cope with the little information of the wiki.
How can I send CAN signals? The table in the web interface, unfortunately, I do not quite understand. Is there a description of what is meant by "Plot" "l" "r" "Map to CAN" and so on? How do I get the engine temperature for example on ID 0x123 on CAN output?
I thank you for the help.
Greeting,
Patrick
I can not cope with the little information of the wiki.
How can I send CAN signals? The table in the web interface, unfortunately, I do not quite understand. Is there a description of what is meant by "Plot" "l" "r" "Map to CAN" and so on? How do I get the engine temperature for example on ID 0x123 on CAN output?
I thank you for the help.
Greeting,
Patrick
-
- Posts: 102
- Joined: Wed Apr 10, 2019 2:32 pm
- Location: France
- Has thanked: 2 times
- Been thanked: 11 times
Re: Help with CAN
Hi,
The L (left) and R (right) litle boxes are for live plotting, to use it, you clik the box (for example rpm and L) and scroll down to plotting and click start plot, it will show the rpm live with the scale on the left.
To send can messages you have to specify the ID (in decimal) for example 0X123 would be ID 291 then what position is you data and how long and finaly the gain ie multiplier. Then click on can TX and save parameters. That should do it.
Keep in mind that the inverter will spit out can data as soon as it is powered on.
The L (left) and R (right) litle boxes are for live plotting, to use it, you clik the box (for example rpm and L) and scroll down to plotting and click start plot, it will show the rpm live with the scale on the left.
To send can messages you have to specify the ID (in decimal) for example 0X123 would be ID 291 then what position is you data and how long and finaly the gain ie multiplier. Then click on can TX and save parameters. That should do it.
Keep in mind that the inverter will spit out can data as soon as it is powered on.
Re: Help with CAN
Hi,
i have my problems with "Position" and "Bits". What exactly i should write in the boxes?
Bits = 8 , Position = ?
i have my problems with "Position" and "Bits". What exactly i should write in the boxes?
Bits = 8 , Position = ?
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1486 times
- Contact:
Re: Help with CAN
A CAN message can have up to 8 data bytes i.e. 64 data bits
0 1 ... 62 63
The positions field specifies were in those 64 bits your data is put. So if your specify 16 as position and 8 as length:
x x x x x x x x x x x x x x x x y o u r d a t a x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
0 1 ... 62 63
The positions field specifies were in those 64 bits your data is put. So if your specify 16 as position and 8 as length:
x x x x x x x x x x x x x x x x y o u r d a t a x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Help with CAN
Hi,
But a "2" in Theorie length and Position field means what? Two Byte, Two bit?
thats the thing that was unclear.
But a "2" in Theorie length and Position field means what? Two Byte, Two bit?
thats the thing that was unclear.
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1486 times
- Contact:
Re: Help with CAN
two bits
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Help with CAN
And the "Position"? They couldnt mean bit 2, when Thema Information is one Byte long.
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1486 times
- Contact:
Re: Help with CAN
Yes it's bits. Why don't you just experiment and see what happens. Nothing can break.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Help with CAN
Hi,
I tried. But i couldnt get any Signal from the can sniffer. With the can in my smart roadster, i could read out the Massages.
Im new with can Systems and the Controllerboard /Webinterface.
I tried. But i couldnt get any Signal from the can sniffer. With the can in my smart roadster, i could read out the Massages.
Im new with can Systems and the Controllerboard /Webinterface.
-
- Posts: 102
- Joined: Wed Apr 10, 2019 2:32 pm
- Location: France
- Has thanked: 2 times
- Been thanked: 11 times
Re: Help with CAN
Have you setup the can ? ie speed to be the same on both devices ? Is your bus terminated ?
You should have 60 ohm between CAN H and CAN L.
You should have 60 ohm between CAN H and CAN L.
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1486 times
- Contact:
Re: Help with CAN
Right, "canspeed" defaults to 250kbit/s. Does that correlate with your sniffer?
Point is: even if you don't get the bit banging right you should still see *a* message
Point is: even if you don't get the bit banging right you should still see *a* message
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Help with CAN
Hi,
yea can speed at 250k, Bus terminatet with 120ohm.
I would try another can sniffer next week, the actual one is not the Best (25€ cam Bus analyzer)
yea can speed at 250k, Bus terminatet with 120ohm.
I would try another can sniffer next week, the actual one is not the Best (25€ cam Bus analyzer)
Re: Help with CAN
The "other" new web-interface in works for CAN
I think the trick to receive proper can messages is to set Gian to 32. Also only one direction TX or RX not both.
Here is an early preview. Support for CANable, uCCB and USB2CAN, what adapters are you using?

Here is an early preview. Support for CANable, uCCB and USB2CAN, what adapters are you using?
- Jack Bauer
- Posts: 3639
- Joined: Wed Dec 12, 2018 5:24 pm
- Location: Ireland
- Has thanked: 9 times
- Been thanked: 280 times
- Contact:
Re: Help with CAN
Add the USBtin to the list:dima wrote: ↑Wed Jul 24, 2019 3:50 am The "other" new web-interface in works for CANI think the trick to receive proper can messages is to set Gian to 32. Also only one direction TX or RX not both.
Here is an early preview. Support for CANable, uCCB and USB2CAN, what adapters are you using?
scheenshot1.png
https://www.fischl.de/usbtin/
Robin Hellström
MR Electronics AB
MR Electronics AB
- johu
- Site Admin
- Posts: 6623
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1486 times
- Contact:
Re: Help with CAN
Nice work! So does the web interface somehow communicate over CAN? Because you're mentioning the adapter
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Re: Help with CAN
No, just a lot of background work like preps the drivers (Windows) and installs "Cantact App" or "Cangaroo App" and firmware updates (takes care of DFU installation and such) good for DIY adapters like USB2CAN, which I soldered myself and confirm working

-
- Posts: 260
- Joined: Sat Jan 12, 2019 12:39 am
- Location: UK
- Been thanked: 1 time
Re: Help with CAN
My turn to be confused about the CAN interface. I've been looking at the wiki and I should be able to get and set parameters using SDO.
I have a cantact board and have been sending stuff back and forth with an arduino. The brain board does respond but not how I would expect it to from what's in the wiki.
cansend to get the first parameter:
gives the following
candump:
The response is 'invalid index' shifted 2 bytes right?
edit: I'm using the latest FOC code from github
I have a cantact board and have been sending stuff back and forth with an arduino. The brain board does respond but not how I would expect it to from what's in the wiki.
cansend to get the first parameter:
Code: Select all
cansend can0 601#2220000000000000
candump:
Code: Select all
can0 601 [8] 22 20 00 00 00 00 00 00 '" ......'
can0 581 [8] 80 20 00 00 00 00 02 06 '. ......'
edit: I'm using the latest FOC code from github
-
- Posts: 260
- Joined: Sat Jan 12, 2019 12:39 am
- Location: UK
- Been thanked: 1 time
Re: Help with CAN
OK been experimenting some more, sending 0x20 as the third byte gets a 581 response
so to get syncofs (index 8 from using list)
gets me
syncofs is currently set to 2500. The returned value doesn't change if I change syncofs.
list:
so to get syncofs (index 8 from using list)
Code: Select all
cansend can0 601#2200200800000000
Code: Select all
can0 601 [8] 22 00 20 08 00 00 00 00 '". .....'
can0 581 [8] 43 00 20 08 80 00 00 00 'C. .....'
list:
Code: Select all
Available parameters and values
curqkp [] (index 0)
curqki [] (1)
curdkp [] (2)
curdki [] (3)
fweak [Hz] (4)
idweak [A/Hz] (5)
fmax [Hz] (6)
dirchrpm [rpm] (7)
syncofs [dig] (8)
...
Re: Help with CAN
Just an observation
It sounds like you are going "complicated" route. It looks like you are using "candleLight" firmware with your canable. It is good for advanced captures but not for newbies. Second firmware is called "slcan" it uses COM to "proxy" your CAN messages - this way you use a nice GUI interface.
Here is some firmware builds for your CAN adapter: https://canable.io/builds/

It sounds like you are going "complicated" route. It looks like you are using "candleLight" firmware with your canable. It is good for advanced captures but not for newbies. Second firmware is called "slcan" it uses COM to "proxy" your CAN messages - this way you use a nice GUI interface.
Here is some firmware builds for your CAN adapter: https://canable.io/builds/
-
- Posts: 260
- Joined: Sat Jan 12, 2019 12:39 am
- Location: UK
- Been thanked: 1 time
Re: Help with CAN
Yes I am using candlelight. I'm quite comfortable with command line and getting it going was very simple. I only broke it out because my arduino (with CAN shield) code didn't seem to be doing what was expected. The arduino sends and receives exactly the same as cansend and candump, so I'm not sure how a UI will change that?
Do you have CAN working with that UI? I'd be very interested in whether the messages were the same.
Admittedly I've not re-flashed the CAN adaptor yet but that UI fails with:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:~/CAN/cantact/platform/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Do you have CAN working with that UI? I'd be very interested in whether the messages were the same.
Admittedly I've not re-flashed the CAN adaptor yet but that UI fails with:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:~/CAN/cantact/platform/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
-
- Posts: 260
- Joined: Sat Jan 12, 2019 12:39 am
- Location: UK
- Been thanked: 1 time
Re: Help with CAN
Hi,
i buy a "CanUSB" Dongle and now i see CAN-Signals
I try to send the "Version" Value "4.17.R" to the CAN. I find the CAN-Package (001), but in there is only this I Write in the WebInterface at "Version" row :
-CanID : 001
-Position : 1
-Bits : 16
-Gain : 1
-Map to Can TX
Sorry, im a totaly Noob with this, i could only programm assambler
PS. how i could send CAN-Commands to the Controller? e.g. to chance the recuperation strength
i buy a "CanUSB" Dongle and now i see CAN-Signals

I try to send the "Version" Value "4.17.R" to the CAN. I find the CAN-Package (001), but in there is only this I Write in the WebInterface at "Version" row :
-CanID : 001
-Position : 1
-Bits : 16
-Gain : 1
-Map to Can TX
Sorry, im a totaly Noob with this, i could only programm assambler

PS. how i could send CAN-Commands to the Controller? e.g. to chance the recuperation strength
-
- Posts: 260
- Joined: Sat Jan 12, 2019 12:39 am
- Location: UK
- Been thanked: 1 time
Re: Help with CAN
So back on candlelight.
Output as seen by the arduino one byte per line in HEX:
Same message sent as before - request for syncofs sent from PC to brain board. So same bytes in the same order as seen by candump.
syncofs is 2500 -> in HEX 0x9C4 -> binary 0b100111000100
For ease of reference the wiki page is here https://openinverter.org/wiki/CAN_commu ... rs_via_SDO
I just don't understand what I'm missing
1) why are bytes 2 and 3 appearing to be swapped? in ProcessSDO it appears to recognise it as 0x2000.
2) Is it something to do with the FOC branch?
3) is the sub index wrong? (eg. I don't have 'boost' returned by the list command)
Output as seen by the arduino one byte per line in HEX:
Code: Select all
Received packet with id 0x601 and length 8
22
00
20
08
00
00
00
00
Received packet with id 0x581 and length 8
43
00
20
08
80
00
00
00
syncofs is 2500 -> in HEX 0x9C4 -> binary 0b100111000100
For ease of reference the wiki page is here https://openinverter.org/wiki/CAN_commu ... rs_via_SDO
I just don't understand what I'm missing
1) why are bytes 2 and 3 appearing to be swapped? in ProcessSDO it appears to recognise it as 0x2000.
2) Is it something to do with the FOC branch?
3) is the sub index wrong? (eg. I don't have 'boost' returned by the list command)
Re: Help with CAN
https://stackoverflow.com/questions/468 ... -on-debiandoobedoobedo wrote: ↑Thu Aug 08, 2019 4:13 pm WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:~/CAN/cantact/platform/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Code: Select all
can tx version 001 0 16 1
Code: Select all
can rx syncofs 601 0 16 32