Independent CAN BUS transmitt on V2 board [SOLVED]
-
- Posts: 3276
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 80 times
- Been thanked: 239 times
- Contact:
Independent CAN BUS transmitt on V2 board
Hi
I would like to know if i can use inverter board to send my custom CAN messages when inverter is in operation.
What i desire is to send msg to DCDC converter which is Ampera part.
CAN ID is 01 D4, Msg is A0 B2 in 50ms period. Can i programm your Rev 2 board to do that when it is in operation Johannes?
tnx
I would like to know if i can use inverter board to send my custom CAN messages when inverter is in operation.
What i desire is to send msg to DCDC converter which is Ampera part.
CAN ID is 01 D4, Msg is A0 B2 in 50ms period. Can i programm your Rev 2 board to do that when it is in operation Johannes?
tnx
Re: Independent CAN BUS transmitt on V2 board
This could easily be done with some minor software modification, by placing the lines below at the end of the Ms10Task in stm32_sine.cpp. But this would send your message in every 10ms of course.
Code: Select all
static void Ms10Task(void)
{
...
if (MOD_RUN == opmode) {
uint32_t myCanData[2] = { 0xA0B20000, 0x00000000 };
uint32_t myCanId = 0x000001D4;
Can::Send(myCanId, myCanData);
}
-
- Posts: 3276
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 80 times
- Been thanked: 239 times
- Contact:
Re: Independent CAN BUS transmitt on V2 board
No, what i meant was if i could setup any custom ID and MSG inside web interface to be output in the blind. It could just as easily be some inverter parameter, but i would like it to be that specific code. I could say it would be a CAN heartbeat for inverter.nailgg wrote: ↑Wed Jul 03, 2019 6:18 pm This could easily be done with some minor software modification, by placing the lines below at the end of the Ms10Task in stm32_sine.cpp. But this would send your message in every 10ms of course.
Code: Select all
static void Ms10Task(void) { ... if (MOD_RUN == opmode) { uint32_t myCanData[2] = { 0xA0B20000, 0x00000000 }; uint32_t myCanId = 0x000001D4; Can::Send(myCanId, myCanData); }
Re: Independent CAN BUS transmitt on V2 board
With the current software you can only send the existing parameters like udc, speed etc. The software needs to be modified in order to be able to define arbitrary messages through the web interface (or console) other than the existing parameters. Maybe Johannes or someone else could implement sending arbitrary data over CAN other than already existing parameters. But I think the easiest solution for your case is hardcoding your custom data into the software, at least for current version.
-
- Posts: 3276
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 80 times
- Been thanked: 239 times
- Contact:
Re: Independent CAN BUS transmitt on V2 board
What about if i would declare parameter that is always on when inverter is working, like "din_forward"? Then i would assign ID MSG and interval whatever i like. Would that work?nailgg wrote: ↑Wed Jul 03, 2019 7:53 pm With the current software you can only send the existing parameters like udc, speed etc. The software needs to be modified in order to be able to define arbitrary messages through the web interface (or console) other than the existing parameters. Maybe Johannes or someone else could implement sending arbitrary data over CAN other than already existing parameters. But I think the easiest solution for your case is hardcoding your custom data into the software, at least for current version.
Re: Independent CAN BUS transmitt on V2 board
Hmm. That sounds like a nice little hack. So your message is 0xA0 0xB2 which is 41138 in decimal. Maybe you can send din_forward or even better opmode with 41138 gain. Might be worth trying.
Code: Select all
can tx opmode 468 0 16 41138
- johu
- Site Admin
- Posts: 5836
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 163 times
- Been thanked: 1058 times
- Contact:
Re: Independent CAN BUS transmitt on V2 board
Sorry gain is signed 16 bit but you could still do it byte-wise.
Of course to map one signal in multiple places you can't use the web interface but the command you suggest will work multiple times
(I'm sure I swapped bytes )
Of course to map one signal in multiple places you can't use the web interface but the command you suggest will work multiple times
Code: Select all
can tx opmode 468 0 8 160
can tx opmode 468 8 8 178
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 3276
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 80 times
- Been thanked: 239 times
- Contact:
Re: Independent CAN BUS transmitt on V2 board
So if i can understand how it works...
I need to broadcast ID 01D4 with byte0 A0 and byte1 B2.
This would then look like this?
can tx opmode 468 0 8 160
can tx opmode 468 1 8 178
why the 8? If this is two byte message shouldnt i use 2 instead?
tnx
I need to broadcast ID 01D4 with byte0 A0 and byte1 B2.
This would then look like this?
can tx opmode 468 0 8 160
can tx opmode 468 1 8 178
why the 8? If this is two byte message shouldnt i use 2 instead?
tnx
Re: Independent CAN BUS transmitt on V2 board [SOLVED]
Code: Select all
can tx opmode 468 0 8 160
can tx opmode 468 8 8 178
can tx PARAMETER CANID START_BIT LENGTH GAIN
With the second line, you define a signal of 8-bit length that starts from the bit 8. So your data will be on bits 8:15. You are streaming opmode with 178 gain. That would give you 0xB2 on the second byte when opmode==1 and 0x00 when opmode==0
Re: Independent CAN BUS transmitt on V2 board
I cannot find what is exact command for removing individual can tx? Not clear command - that clears everything.
Tried all combinations:
Tried all combinations:
Code: Select all
can tx opmode remove
can opmode remove
can remove opmode
- johu
- Site Admin
- Posts: 5836
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 163 times
- Been thanked: 1058 times
- Contact:
Re: Independent CAN BUS transmitt on V2 board
Code: Select all
can del opmode
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9