pleased to hear there is a binary data stream option now as I'm keen on logging as much data to sd as i can, and CANBUS was getting limiting.
Is there a write-up of what is available and how to configure binstream as well as decode the stream ?
thanks
Binstream write-up
-
- Posts: 321
- Joined: Mon Jul 25, 2022 7:59 pm
- Location: Bicester, Oxfordshire
- Has thanked: 8 times
- Been thanked: 46 times
Binstream write-up
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
- johu
- Site Admin
- Posts: 5792
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 158 times
- Been thanked: 1028 times
- Contact:
Re: Binstream write-up
I might have explained it somewhere but I'd say it's yet undocumented... But it's simple.
Will stream il1 and il2 forever, can be interrupted by sending any character.
Will give you 1000 samples of id and iq
Data format is 32 bit signed with 5 binary decimals, i.e. divide values by 32 to obtain physical value.
Code: Select all
binstream -1 il1,il2
Code: Select all
binstream 1000 id,iq
Data format is 32 bit signed with 5 binary decimals, i.e. divide values by 32 to obtain physical value.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 1801
- Joined: Sun Apr 03, 2022 1:57 pm
- Has thanked: 102 times
- Been thanked: 347 times
Re: Binstream write-up
Really depends what kind of logging you want to do, what's your goal?
For logging where you have a laptop/tablet handy the web page plotting is easiest to do. Don't think it supports binstream yet though.
For general purpose logging of everything going on with the car CAN logging is hard to beat as it will catch everything going on over the CAN bus by default, plus whatever you configure the inverter to send. GVRET is very good supports use with an SD card on Due hardware (this is my current setup - GVRET box and GVRET SD card) although I may see if it can be ported to the ESP32 for use with this viewtopic.php?t=3361. SavvyCAN also makes viewing the data, whether directly or from SD card, very easy.
Bigpie and I also looked at an option for much more detailed SD based logging just from the inverter (see viewtopic.php?t=2690). It was originally aimed at collecting enough data to identify why people were having issues with trips and unwanted accel/regen on the FOC firmware but the simulation thread helped fix most of the issues so it sort of fell by the wayside (the logging mode was only supported in a custom version of 5.20 code). I still plan to resurrect it for my build running on the ESP32 linked above. The idea is to have it permanently running in the background so that if something unexpected happens the data is there to analyse and figure out the problem. Eventually I'd like to be able to select from a number of profiles, say a general one that logs and bit of everything (both car control and motor data) and a motor control one that logs all the motor data on every pass of the control loop.
For logging where you have a laptop/tablet handy the web page plotting is easiest to do. Don't think it supports binstream yet though.
For general purpose logging of everything going on with the car CAN logging is hard to beat as it will catch everything going on over the CAN bus by default, plus whatever you configure the inverter to send. GVRET is very good supports use with an SD card on Due hardware (this is my current setup - GVRET box and GVRET SD card) although I may see if it can be ported to the ESP32 for use with this viewtopic.php?t=3361. SavvyCAN also makes viewing the data, whether directly or from SD card, very easy.
Bigpie and I also looked at an option for much more detailed SD based logging just from the inverter (see viewtopic.php?t=2690). It was originally aimed at collecting enough data to identify why people were having issues with trips and unwanted accel/regen on the FOC firmware but the simulation thread helped fix most of the issues so it sort of fell by the wayside (the logging mode was only supported in a custom version of 5.20 code). I still plan to resurrect it for my build running on the ESP32 linked above. The idea is to have it permanently running in the background so that if something unexpected happens the data is there to analyse and figure out the problem. Eventually I'd like to be able to select from a number of profiles, say a general one that logs and bit of everything (both car control and motor data) and a motor control one that logs all the motor data on every pass of the control loop.
-
- Posts: 321
- Joined: Mon Jul 25, 2022 7:59 pm
- Location: Bicester, Oxfordshire
- Has thanked: 8 times
- Been thanked: 46 times
Re: Binstream write-up
thank youjohu wrote: ↑Fri Apr 14, 2023 7:04 pm I might have explained it somewhere but I'd say it's yet undocumented... But it's simple.Will stream il1 and il2 forever, can be interrupted by sending any character.Code: Select all
binstream -1 il1,il2
Will give you 1000 samples of id and iqCode: Select all
binstream 1000 id,iq
Data format is 32 bit signed with 5 binary decimals, i.e. divide values by 32 to obtain physical value.
Daft questioning coming up - where does it stream it to ? To the esp8266 serial interface I guess. I was hoping it might replace the can data on the can lines but i guess there is can hardware there that might make that difficult.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
-
- Posts: 321
- Joined: Mon Jul 25, 2022 7:59 pm
- Location: Bicester, Oxfordshire
- Has thanked: 8 times
- Been thanked: 46 times
Re: Binstream write-up
I did this before using an ME442 ECU in a kit car, because basically like you i want to log everything to SD all the time so i can refer to it when needed. The can interface on the V1C board has a limitation of 10 data items I believe, i think due to cpu overhead so you can't log everything.Pete9008 wrote: ↑Sat Apr 15, 2023 10:33 am Really depends what kind of logging you want to do, what's your goal?
For logging where you have a laptop/tablet handy the web page plotting is easiest to do. Don't think it supports binstream yet though.
For general purpose logging of everything going on with the car CAN logging is hard to beat as it will catch everything going on over the CAN bus by default, plus whatever you configure the inverter to send. GVRET is very good supports use with an SD card on Due hardware (this is my current setup - GVRET box and GVRET SD card) although I may see if it can be ported to the ESP32 for use with this viewtopic.php?t=3361. SavvyCAN also makes viewing the data, whether directly or from SD card, very easy.
Bigpie and I also looked at an option for much more detailed SD based logging just from the inverter (see viewtopic.php?t=2690). It was originally aimed at collecting enough data to identify why people were having issues with trips and unwanted accel/regen on the FOC firmware but the simulation thread helped fix most of the issues so it sort of fell by the wayside (the logging mode was only supported in a custom version of 5.20 code). I still plan to resurrect it for my build running on the ESP32 linked above. The idea is to have it permanently running in the background so that if something unexpected happens the data is there to analyse and figure out the problem. Eventually I'd like to be able to select from a number of profiles, say a general one that logs and bit of everything (both car control and motor data) and a motor control one that logs all the motor data on every pass of the control loop.
I was hoping binstream was going to solve this issue but if the stream is to the esp8266, it would then need to be passed from there to something with an sd card like a Teensy.
Ideally binstream would be a TTL level serial stream configured via the web interface like the CAN piece is but that likely requires a hardware change.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
- johu
- Site Admin
- Posts: 5792
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 158 times
- Been thanked: 1028 times
- Contact:
Re: Binstream write-up
That's what it is, it logs to a TTL level serial port. Usually an ESP8266 sits there but you can replace that with something that suits your needs better, like Petes ESP32 + SD-Card solution or an RS422 transceiver whose data lines you somehow route outside the enclosure.FFMan wrote: ↑Sun Apr 16, 2023 7:48 am I was hoping binstream was going to solve this issue but if the stream is to the esp8266, it would then need to be passed from there to something with an sd card like a Teensy.
Ideally binstream would be a TTL level serial stream configured via the web interface like the CAN piece is but that likely requires a hardware change.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 321
- Joined: Mon Jul 25, 2022 7:59 pm
- Location: Bicester, Oxfordshire
- Has thanked: 8 times
- Been thanked: 46 times
Re: Binstream write-up
yep i see thank youjohu wrote: ↑Sun Apr 16, 2023 8:23 am That's what it is, it logs to a TTL level serial port. Usually an ESP8266 sits there but you can replace that with something that suits your needs better, like Petes ESP32 + SD-Card solution or an RS422 transceiver whose data lines you somehow route outside the enclosure.
E46 touring
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs
Phev rear motor, OEM inverter cabin heater and charger
BMW 9kwh & 12kwh packs