Zombie and SDO
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
Zombie and SDO
Another Zombie question. Has anyone used CAN SDO with zombie to change parameters?
I a little lost on what variant of CAN SDO it uses. It looks like it references a branch of the libpopeninv from 10 months ago, so I'm guessing it would be using 0x23 as the command byte to change a parameter.
Although so far I haven't had much luck with the older commands either. Running the latest Zombie build if that is significant. I'm aware SDO has had a big change on the Open Inverter firmware recently, but from what I can tell that wouldn't affect the current Zombie build.
I a little lost on what variant of CAN SDO it uses. It looks like it references a branch of the libpopeninv from 10 months ago, so I'm guessing it would be using 0x23 as the command byte to change a parameter.
Although so far I haven't had much luck with the older commands either. Running the latest Zombie build if that is significant. I'm aware SDO has had a big change on the Open Inverter firmware recently, but from what I can tell that wouldn't affect the current Zombie build.
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
Re: Zombie and SDO
Bit of an update. Been trying both new and old format message. This current message is trying to change Throtmax which is number 25 on the param_prj.h. Trying to change the value of Throtmax to 10.
Can Id 601
old format: 40 01 20 19 40 01 00 00
new format: 23 00 21 19 40 01 00 00
Can Id 601
old format: 40 01 20 19 40 01 00 00
new format: 23 00 21 19 40 01 00 00
- johu
- Site Admin
- Posts: 6620
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Zombie and SDO
Does it work? There are more format changes in recent libopeninv, not sure if anyone dares upgrading.
The BMS uses the latest version for reference https://github.com/jsphuebner/FlyingAdcBms
The BMS uses the latest version for reference https://github.com/jsphuebner/FlyingAdcBms
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
Re: Zombie and SDO
Oh yeah sorry missed out that quite important point in my last post. Didn't seem to work in either format. I think it's a Zombie specific thing, seen the new format working with the most recent OI firmware on an LDU board this last week.
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
Re: Zombie and SDO
Have got a theory from Mr Catphish on why it's not working. Doesn't look like Zombie has anything in CAN filtering to allow the SDO messages through. Will try and test it this week and update.
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
Re: Zombie and SDO
Got it working today. First I needed to add the SDO id to the canbus filter in stm32_vcu.cpp
It uses the new format of SDO semantics. Take the parameter id you want to change from param_prj.h.
So the message to change throtmax (id 25) would be 0x23, 0x01, 0x20, 25, data, data, data, data.
Have sent a pull request so this should make it's way onto a zombie release in due course.
Code: Select all
canInterface[1]->RegisterUserMessage(0x601); //CanSDO
canInterface[0]->RegisterUserMessage(0x601); //CanSDO
So the message to change throtmax (id 25) would be 0x23, 0x01, 0x20, 25, data, data, data, data.
Have sent a pull request so this should make it's way onto a zombie release in due course.
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
Re: Zombie and SDO
As of 2.04 this no longer seems to work in Zombie. I know there has been some changes but I can't figure out the new format, should it have changed in the new version of libopeninv that 2.04 uses? The wiki page on canbus is still referencing the original formats.LRBen wrote: ↑Tue Nov 07, 2023 8:03 pm Got it working today. First I needed to add the SDO id to the canbus filter in stm32_vcu.cppIt uses the new format of SDO semantics. Take the parameter id you want to change from param_prj.h.Code: Select all
canInterface[1]->RegisterUserMessage(0x601); //CanSDO canInterface[0]->RegisterUserMessage(0x601); //CanSDO
So the message to change throtmax (id 25) would be 0x23, 0x01, 0x20, 25, data, data, data, data.
Have sent a pull request so this should make it's way onto a zombie release in due course.
- johu
- Site Admin
- Posts: 6620
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 344 times
- Been thanked: 1485 times
- Contact:
Re: Zombie and SDO
Just checked, Zombie uses the new SDO module on CAN1:
It will register message 0x603 because nodeid=3 (you don't need the line above)
https://github.com/jsphuebner/libopenin ... do.cpp#L82
Code: Select all
Stm32Can c(CAN1, CanHardware::Baud500);
...
CanSdo sdo(&c, &cm);
sdo.SetNodeId(3);
https://github.com/jsphuebner/libopenin ... do.cpp#L82
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
-
- Posts: 561
- Joined: Thu Jul 04, 2019 6:35 pm
- Location: Somerset, UK
- Has thanked: 75 times
- Been thanked: 212 times
Re: Zombie and SDO
So tomorrow was a long time coming. Got back around to it today.
Works with 0x603, so now for example the message to change throtmax (id 25 so 0x19 in hex) would be ID 0x603. Data: 0x23, 0x00, 0x21, 0x19, data, data, data, data.
Works with 0x603, so now for example the message to change throtmax (id 25 so 0x19 in hex) would be ID 0x603. Data: 0x23, 0x00, 0x21, 0x19, data, data, data, data.